Skip to content

usb: enable sysfs module symlink for more built-in drivers

Shashank Balaji linux-embedded linux-usb lkml netdev 1 version In review

Get series with b4
b4 am [email protected] change-id 20260722-mod_name_usb-e3baf58e1e1e

Versions newest first

  1. v1 Latest4 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4usb: core: pass THIS_MODULE implicitly through a macrodrivers/net/usb/r8152.c drivers/usb/core/driver.c drivers/usb/core/usb.c +4 more+11 -91 reply
2/4usb: core: set mod_name in driver registrationdrivers/usb/core/driver.c include/linux/usb.h+5 -31 reply
3/4usb: typec: set mod_name in driver registrationdrivers/usb/typec/bus.c include/linux/usb/typec_altmode.h+5 -31 reply
4/4usb: ulpi: set mod_name in driver registrationdrivers/usb/common/ulpi.c include/linux/ulpi/driver.h+5 -30 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchHeikki KrogerusBastien Nocera
SeriesR-b
1/4
2/4
3/4A-b
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] usb: enable sysfs module symlink for more built-in drivers

This is in continuation to [1].

struct device_driver's mod_name is not set by a number of bus' driver registration functions. Without that, built-in drivers don't have the module symlink in sysfs. We want this to go from unbound driver name -> module name -> kernel config name. This is useful on embedded platforms to minimize kernel config, reduce kernel size, and reduce boot time.

This patchset adds mod_name to usb-related drivers.

[1] https://lore.kernel.org/all/[email protected]/

---
Shashank Balaji (4):
usb: core: pass THIS_MODULE implicitly through a macro
usb: core: set mod_name in driver registration
usb: typec: set mod_name in driver registration
usb: ulpi: set mod_name in driver registration

 include/linux/ulpi/driver.h             |  4 ++--
 include/linux/usb.h                     |  6 ++++--
 include/linux/usb/typec_altmode.h       |  4 ++--
 drivers/net/usb/r8152.c                 |  2 +-
 drivers/usb/common/ulpi.c               |  4 +++-
 drivers/usb/core/driver.c               | 10 ++++++----
 drivers/usb/core/usb.c                  |  2 +-
 drivers/usb/misc/apple-mfi-fastcharge.c |  2 +-
 drivers/usb/misc/onboard_usb_dev.c      |  2 +-
 drivers/usb/typec/bus.c                 |  4 +++-
 drivers/usb/usbip/stub_main.c           |  2 +-
 11 files changed, 25 insertions(+), 17 deletions(-)

---
base-commit: 248951ddc14de84de3910f9b13f51491a8cd91df
change-id: 20260722-mod_name_usb-e3baf58e1e1e

Best regards,

Signature · 1 line
Shashank Balaji <[email protected]>