Linux-USB Archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Johan Hovold <johan@kernel.org>,
	 Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Subject: [PATCH v2 0/2] USB: store owner from modules with usb_serial_register_drivers()
Date: Fri, 03 May 2024 12:10:51 +0200	[thread overview]
Message-ID: <20240503-module-owner-usb-serial-v2-0-7887769dbeff@linaro.org> (raw)

Changes in v2:
- Squash .owner removalr patches into one (Johan)
- Drop owner from f81534 driver
- kerneldoc "module/owner" -> module (Johan)
- Fix amba->usb copypasta
- Link to v1: https://lore.kernel.org/r/20240328-module-owner-usb-serial-v1-0-bc46c9ffbf56@linaro.org

Description
===========
Modules registering driver with usb_serial_register_drivers() might
forget to set .owner field.

Solve the problem by moving this task away from the drivers to the core
USB code, just like we did for platform_driver in commit
9447057eaff8 ("platform_device: use a macro instead of
platform_driver_register").

Best regards,
Krzysztof

---
Krzysztof Kozlowski (2):
      USB: serial: store owner from modules with usb_serial_register_drivers()
      USB: serial: drop driver owner initialization

 drivers/usb/serial/aircable.c          |  1 -
 drivers/usb/serial/ark3116.c           |  1 -
 drivers/usb/serial/belkin_sa.c         |  1 -
 drivers/usb/serial/ch341.c             |  1 -
 drivers/usb/serial/cp210x.c            |  1 -
 drivers/usb/serial/cyberjack.c         |  1 -
 drivers/usb/serial/cypress_m8.c        |  3 ---
 drivers/usb/serial/digi_acceleport.c   |  2 --
 drivers/usb/serial/empeg.c             |  1 -
 drivers/usb/serial/f81232.c            |  2 --
 drivers/usb/serial/f81534.c            |  1 -
 drivers/usb/serial/ftdi_sio.c          |  1 -
 drivers/usb/serial/garmin_gps.c        |  1 -
 drivers/usb/serial/generic.c           |  1 -
 drivers/usb/serial/io_edgeport.c       |  4 ----
 drivers/usb/serial/io_ti.c             |  2 --
 drivers/usb/serial/ipaq.c              |  1 -
 drivers/usb/serial/ipw.c               |  1 -
 drivers/usb/serial/ir-usb.c            |  1 -
 drivers/usb/serial/iuu_phoenix.c       |  1 -
 drivers/usb/serial/keyspan.c           |  4 ----
 drivers/usb/serial/keyspan_pda.c       |  2 --
 drivers/usb/serial/kl5kusb105.c        |  1 -
 drivers/usb/serial/kobil_sct.c         |  1 -
 drivers/usb/serial/mct_u232.c          |  1 -
 drivers/usb/serial/metro-usb.c         |  1 -
 drivers/usb/serial/mos7720.c           |  1 -
 drivers/usb/serial/mos7840.c           |  1 -
 drivers/usb/serial/mxuport.c           |  1 -
 drivers/usb/serial/navman.c            |  1 -
 drivers/usb/serial/omninet.c           |  1 -
 drivers/usb/serial/opticon.c           |  1 -
 drivers/usb/serial/option.c            |  1 -
 drivers/usb/serial/oti6858.c           |  1 -
 drivers/usb/serial/pl2303.c            |  1 -
 drivers/usb/serial/qcaux.c             |  1 -
 drivers/usb/serial/qcserial.c          |  1 -
 drivers/usb/serial/quatech2.c          |  1 -
 drivers/usb/serial/safe_serial.c       |  1 -
 drivers/usb/serial/sierra.c            |  1 -
 drivers/usb/serial/spcp8x5.c           |  1 -
 drivers/usb/serial/ssu100.c            |  1 -
 drivers/usb/serial/symbolserial.c      |  1 -
 drivers/usb/serial/ti_usb_3410_5052.c  |  2 --
 drivers/usb/serial/upd78f0730.c        |  1 -
 drivers/usb/serial/usb-serial-simple.c |  1 -
 drivers/usb/serial/usb-serial.c        | 12 +++++++-----
 drivers/usb/serial/usb_debug.c         |  2 --
 drivers/usb/serial/visor.c             |  3 ---
 drivers/usb/serial/whiteheat.c         |  2 --
 drivers/usb/serial/wishbone-serial.c   |  1 -
 drivers/usb/serial/xr_serial.c         |  1 -
 drivers/usb/serial/xsens_mt.c          |  1 -
 include/linux/usb/serial.h             |  7 +++++--
 54 files changed, 12 insertions(+), 76 deletions(-)
---
base-commit: 0a5adf0bc8a1c2a6439d632e49471f64f84d3cef
change-id: 20240328-module-owner-usb-serial-8a067f622b70

Best regards,
-- 
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


             reply	other threads:[~2024-05-03 10:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-03 10:10 Krzysztof Kozlowski [this message]
2024-05-03 10:10 ` [PATCH v2 1/2] USB: serial: store owner from modules with usb_serial_register_drivers() Krzysztof Kozlowski
2024-05-03 10:10 ` [PATCH v2 2/2] USB: serial: drop driver owner initialization Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240503-module-owner-usb-serial-v2-0-7887769dbeff@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).