From ac33bc3d54936d364c1f979e50f43dfa3f9a13c1 Mon Sep 17 00:00:00 2001 From: Russell King Date: Thu, 5 Jan 2006 14:43:11 +0000 Subject: [PATCH] Add usb_serial_bus_type probe and remove methods Signed-off-by: Russell King Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/bus.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'drivers/usb') diff --git a/drivers/usb/serial/bus.c b/drivers/usb/serial/bus.c index 664139afcfa..e9f9f4bafa1 100644 --- a/drivers/usb/serial/bus.c +++ b/drivers/usb/serial/bus.c @@ -37,11 +37,6 @@ static int usb_serial_device_match (struct device *dev, struct device_driver *dr return 0; } -struct bus_type usb_serial_bus_type = { - .name = "usb-serial", - .match = usb_serial_device_match, -}; - static int usb_serial_device_probe (struct device *dev) { struct usb_serial_driver *driver; @@ -109,14 +104,18 @@ exit: return retval; } +struct bus_type usb_serial_bus_type = { + .name = "usb-serial", + .match = usb_serial_device_match, + .probe = usb_serial_device_probe, + .remove = usb_serial_device_remove, +}; + int usb_serial_bus_register(struct usb_serial_driver *driver) { int retval; driver->driver.bus = &usb_serial_bus_type; - driver->driver.probe = usb_serial_device_probe; - driver->driver.remove = usb_serial_device_remove; - retval = driver_register(&driver->driver); return retval; -- cgit v1.2.3 From d78967fb035aeb839a047ae69ce5f1ff39288a8d Mon Sep 17 00:00:00 2001 From: Russell King Date: Fri, 6 Jan 2006 11:41:32 +0000 Subject: [PATCH] Remove usb gadget generic driver methods USB gadget drivers make no use of these, remove the pointless comments. Signed-off-by: Russell King Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/ether.c | 3 --- drivers/usb/gadget/inode.c | 3 --- drivers/usb/gadget/serial.c | 3 --- drivers/usb/gadget/zero.c | 3 --- 4 files changed, 12 deletions(-) (limited to 'drivers/usb') diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index 8f402f85e1c..afc84cfb61f 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c @@ -2534,9 +2534,6 @@ static struct usb_gadget_driver eth_driver = { .driver = { .name = (char *) shortname, .owner = THIS_MODULE, - // .shutdown = ... - // .suspend = ... - // .resume = ... }, }; diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c index c6c279de832..9a4edc5657a 100644 --- a/drivers/usb/gadget/inode.c +++ b/drivers/usb/gadget/inode.c @@ -1738,9 +1738,6 @@ static struct usb_gadget_driver gadgetfs_driver = { .driver = { .name = (char *) shortname, - // .shutdown = ... - // .suspend = ... - // .resume = ... }, }; diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c index 2e6926b3345..ba9acd53102 100644 --- a/drivers/usb/gadget/serial.c +++ b/drivers/usb/gadget/serial.c @@ -374,9 +374,6 @@ static struct usb_gadget_driver gs_gadget_driver = { .disconnect = gs_disconnect, .driver = { .name = GS_SHORT_NAME, - /* .shutdown = ... */ - /* .suspend = ... */ - /* .resume = ... */ }, }; diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c index 6c58636e914..2fc110d3ad5 100644 --- a/drivers/usb/gadget/zero.c +++ b/drivers/usb/gadget/zero.c @@ -1303,9 +1303,6 @@ static struct usb_gadget_driver zero_driver = { .driver = { .name = (char *) shortname, .owner = THIS_MODULE, - // .shutdown = ... - // .suspend = ... - // .resume = ... }, }; -- cgit v1.2.3