Skip to content

Commit

Permalink
[PATCH] Add usb_serial_bus_type probe and remove methods
Browse files Browse the repository at this point in the history
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Russell King authored and Greg Kroah-Hartman committed Jan 13, 2006
1 parent ff2dae7 commit ac33bc3
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions drivers/usb/serial/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -109,14 +104,18 @@ static int usb_serial_device_remove (struct device *dev)
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;
Expand Down

0 comments on commit ac33bc3

Please sign in to comment.