mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-10-29 11:06:29 +08:00
The driver core only creates the sysfs "module" symlink for a built-in driver when its struct device_driver has mod_name set (see module_add_driver()). This driver left mod_name unset, so its built-in form had no such symlink. Set mod_name to KBUILD_MODNAME during driver registration. Built-in drivers now gain the symlink, while loadable modules are unaffected. Co-developed-by: Rahul Bukte <rahul.bukte@sony.com> Signed-off-by: Rahul Bukte <rahul.bukte@sony.com> Signed-off-by: Shashank Balaji <shashank.mahadasyam@sony.com> Reviewed-by: Bastien Nocera <hadess@hadess.net> Link: https://patch.msgid.link/20260722-mod_name_usb-v1-4-96d781530f3f@sony.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>