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:
parent
a4e30cd916
commit
800f181e7a
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue