mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -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
|
|
@ -783,10 +783,11 @@ static LIST_HEAD(ide_pci_drivers);
|
|||
* Returns are the same as for pci_register_driver
|
||||
*/
|
||||
|
||||
int __ide_pci_register_driver(struct pci_driver *driver, struct module *module)
|
||||
int __ide_pci_register_driver(struct pci_driver *driver, struct module *module,
|
||||
const char *mod_name)
|
||||
{
|
||||
if(!pre_init)
|
||||
return __pci_register_driver(driver, module);
|
||||
return __pci_register_driver(driver, module, mod_name);
|
||||
driver->driver.owner = module;
|
||||
list_add_tail(&driver->node, &ide_pci_drivers);
|
||||
return 0;
|
||||
|
|
@ -862,6 +863,6 @@ void __init ide_scan_pcibus (int scan_direction)
|
|||
{
|
||||
list_del(l);
|
||||
d = list_entry(l, struct pci_driver, node);
|
||||
__pci_register_driver(d, d->driver.owner);
|
||||
__pci_register_driver(d, d->driver.owner, d->driver.mod_name);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue