mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
PCI: add the sysfs driver name to all modules
This adds the module name to all PCI drivers, if they are built into the kernel or not. It will show up in /sys/modules/MODULE_NAME/drivers/ It also fixes up the IDE core, which was calling __pci_register_driver() directly. Cc: Kay Sievers <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
fe480a2675
commit
725522b545
4 changed files with 12 additions and 8 deletions
|
|
@ -422,7 +422,8 @@ static struct kobj_type pci_driver_kobj_type = {
|
|||
* If no error occurred, the driver remains registered even if
|
||||
* no device was claimed during registration.
|
||||
*/
|
||||
int __pci_register_driver(struct pci_driver *drv, struct module *owner)
|
||||
int __pci_register_driver(struct pci_driver *drv, struct module *owner,
|
||||
const char *mod_name)
|
||||
{
|
||||
int error;
|
||||
|
||||
|
|
@ -430,6 +431,7 @@ int __pci_register_driver(struct pci_driver *drv, struct module *owner)
|
|||
drv->driver.name = drv->name;
|
||||
drv->driver.bus = &pci_bus_type;
|
||||
drv->driver.owner = owner;
|
||||
drv->driver.mod_name = mod_name;
|
||||
drv->driver.kobj.ktype = &pci_driver_kobj_type;
|
||||
|
||||
if (pci_multithread_probe)
|
||||
|
|
|
|||
Loading…
Reference in a new issue