aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/bus.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2005-06-21 00:15:16 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-10-28 19:47:48 -0400
commit18fcac353fdc7cd072b0d24c8667042e675a4c11 (patch)
tree7cbbcfccf999193e78ff86d9dc3ff1e41ec3b0bf /drivers/usb/serial/bus.c
parentea65370d025f5005649e5cb37c4d025e92c6fc38 (diff)
[PATCH] USB Serial: get rid of the .owner field in usb_serial_driver
Don't duplicate something that's already in struct driver. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/bus.c')
-rw-r--r--drivers/usb/serial/bus.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/usb/serial/bus.c b/drivers/usb/serial/bus.c
index 5a0bcd34bb6d..b8364a8de7df 100644
--- a/drivers/usb/serial/bus.c
+++ b/drivers/usb/serial/bus.c
@@ -57,13 +57,13 @@ static int usb_serial_device_probe (struct device *dev)
57 57
58 driver = port->serial->type; 58 driver = port->serial->type;
59 if (driver->port_probe) { 59 if (driver->port_probe) {
60 if (!try_module_get(driver->owner)) { 60 if (!try_module_get(driver->driver.owner)) {
61 dev_err(dev, "module get failed, exiting\n"); 61 dev_err(dev, "module get failed, exiting\n");
62 retval = -EIO; 62 retval = -EIO;
63 goto exit; 63 goto exit;
64 } 64 }
65 retval = driver->port_probe (port); 65 retval = driver->port_probe (port);
66 module_put(driver->owner); 66 module_put(driver->driver.owner);
67 if (retval) 67 if (retval)
68 goto exit; 68 goto exit;
69 } 69 }
@@ -92,13 +92,13 @@ static int usb_serial_device_remove (struct device *dev)
92 92
93 driver = port->serial->type; 93 driver = port->serial->type;
94 if (driver->port_remove) { 94 if (driver->port_remove) {
95 if (!try_module_get(driver->owner)) { 95 if (!try_module_get(driver->driver.owner)) {
96 dev_err(dev, "module get failed, exiting\n"); 96 dev_err(dev, "module get failed, exiting\n");
97 retval = -EIO; 97 retval = -EIO;
98 goto exit; 98 goto exit;
99 } 99 }
100 retval = driver->port_remove (port); 100 retval = driver->port_remove (port);
101 module_put(driver->owner); 101 module_put(driver->driver.owner);
102 } 102 }
103exit: 103exit:
104 minor = port->number; 104 minor = port->number;
@@ -120,7 +120,6 @@ int usb_serial_bus_register(struct usb_serial_driver *driver)
120 driver->driver.bus = &usb_serial_bus_type; 120 driver->driver.bus = &usb_serial_bus_type;
121 driver->driver.probe = usb_serial_device_probe; 121 driver->driver.probe = usb_serial_device_probe;
122 driver->driver.remove = usb_serial_device_remove; 122 driver->driver.remove = usb_serial_device_remove;
123 driver->driver.owner = driver->owner;
124 123
125 retval = driver_register(&driver->driver); 124 retval = driver_register(&driver->driver);
126 125