aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/bus.c
diff options
context:
space:
mode:
authorRussell King <rmk@arm.linux.org.uk>2006-01-05 09:43:11 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-13 14:26:09 -0500
commitac33bc3d54936d364c1f979e50f43dfa3f9a13c1 (patch)
tree22ea930b8b2a642d0e6efeaa069a111a0b16d0a6 /drivers/usb/serial/bus.c
parentff2dae79773658eaaab731663ddca9f7975430eb (diff)
[PATCH] Add usb_serial_bus_type probe and remove methods
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/bus.c')
-rw-r--r--drivers/usb/serial/bus.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/usb/serial/bus.c b/drivers/usb/serial/bus.c
index 664139afcfa9..e9f9f4bafa17 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
37 return 0; 37 return 0;
38} 38}
39 39
40struct bus_type usb_serial_bus_type = {
41 .name = "usb-serial",
42 .match = usb_serial_device_match,
43};
44
45static int usb_serial_device_probe (struct device *dev) 40static int usb_serial_device_probe (struct device *dev)
46{ 41{
47 struct usb_serial_driver *driver; 42 struct usb_serial_driver *driver;
@@ -109,14 +104,18 @@ exit:
109 return retval; 104 return retval;
110} 105}
111 106
107struct bus_type usb_serial_bus_type = {
108 .name = "usb-serial",
109 .match = usb_serial_device_match,
110 .probe = usb_serial_device_probe,
111 .remove = usb_serial_device_remove,
112};
113
112int usb_serial_bus_register(struct usb_serial_driver *driver) 114int usb_serial_bus_register(struct usb_serial_driver *driver)
113{ 115{
114 int retval; 116 int retval;
115 117
116 driver->driver.bus = &usb_serial_bus_type; 118 driver->driver.bus = &usb_serial_bus_type;
117 driver->driver.probe = usb_serial_device_probe;
118 driver->driver.remove = usb_serial_device_remove;
119
120 retval = driver_register(&driver->driver); 119 retval = driver_register(&driver->driver);
121 120
122 return retval; 121 return retval;