9
0
Fork 0

usb: fix driver name

use the usb_driver name

otherwise we will have a NULL driver entry in devinfo

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
This commit is contained in:
Jean-Christophe PLAGNIOL-VILLARD 2012-01-14 17:29:43 +08:00
parent a4e30cd916
commit 800f181e7a
2 changed files with 1 additions and 1 deletions

View File

@ -1275,6 +1275,7 @@ static int usb_hub_probe(struct usb_device *dev, int ifnum)
int usb_driver_register(struct usb_driver *drv)
{
drv->driver.name = drv->name;
drv->driver.bus = &usb_bus_type;
return register_driver(&drv->driver);
}

View File

@ -621,7 +621,6 @@ static struct usb_driver usb_storage_driver = {
static int __init usb_stor_init(void)
{
usb_storage_driver.name = usb_storage_driver.driver.name;
return usb_driver_register(&usb_storage_driver);
}
device_initcall(usb_stor_init);