From 800f181e7ae7cd96b0595ac86af898eadbe72675 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sat, 14 Jan 2012 17:29:43 +0800 Subject: 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 --- drivers/usb/core/usb.c | 1 + drivers/usb/storage/usb.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index ba23e0e3a0..bd2938d2b7 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@ -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); } diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index 5f15464711..fa3691af15 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c @@ -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); -- cgit v1.2.3