diff options
Diffstat (limited to 'drivers/usb/serial/bus.c')
-rw-r--r-- | drivers/usb/serial/bus.c | 9 |
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 | } |
103 | exit: | 103 | exit: |
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 | ||