diff options
author | Alan Cox <alan@redhat.com> | 2008-07-22 06:09:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-22 16:03:22 -0400 |
commit | c97611c16d9b3c37fcf3c18cc442dfde3a8b5d43 (patch) | |
tree | 91af9c94d977ddcadcd9ad063c33115d63af5257 /drivers/usb/serial/bus.c | |
parent | b69c14992ecbff99d1b2b66d8ccbcffe131c6e38 (diff) |
usb-serial-bus: tidy coding style
Tidy up
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/usb/serial/bus.c')
-rw-r--r-- | drivers/usb/serial/bus.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/usb/serial/bus.c b/drivers/usb/serial/bus.c index 0b14aea8ebd5..83bbb5bca2ef 100644 --- a/drivers/usb/serial/bus.c +++ b/drivers/usb/serial/bus.c | |||
@@ -15,7 +15,8 @@ | |||
15 | #include <linux/usb.h> | 15 | #include <linux/usb.h> |
16 | #include <linux/usb/serial.h> | 16 | #include <linux/usb/serial.h> |
17 | 17 | ||
18 | static int usb_serial_device_match (struct device *dev, struct device_driver *drv) | 18 | static int usb_serial_device_match(struct device *dev, |
19 | struct device_driver *drv) | ||
19 | { | 20 | { |
20 | struct usb_serial_driver *driver; | 21 | struct usb_serial_driver *driver; |
21 | const struct usb_serial_port *port; | 22 | const struct usb_serial_port *port; |
@@ -46,7 +47,7 @@ static ssize_t show_port_number(struct device *dev, | |||
46 | 47 | ||
47 | static DEVICE_ATTR(port_number, S_IRUGO, show_port_number, NULL); | 48 | static DEVICE_ATTR(port_number, S_IRUGO, show_port_number, NULL); |
48 | 49 | ||
49 | static int usb_serial_device_probe (struct device *dev) | 50 | static int usb_serial_device_probe(struct device *dev) |
50 | { | 51 | { |
51 | struct usb_serial_driver *driver; | 52 | struct usb_serial_driver *driver; |
52 | struct usb_serial_port *port; | 53 | struct usb_serial_port *port; |
@@ -66,7 +67,7 @@ static int usb_serial_device_probe (struct device *dev) | |||
66 | retval = -EIO; | 67 | retval = -EIO; |
67 | goto exit; | 68 | goto exit; |
68 | } | 69 | } |
69 | retval = driver->port_probe (port); | 70 | retval = driver->port_probe(port); |
70 | module_put(driver->driver.owner); | 71 | module_put(driver->driver.owner); |
71 | if (retval) | 72 | if (retval) |
72 | goto exit; | 73 | goto exit; |
@@ -77,8 +78,8 @@ static int usb_serial_device_probe (struct device *dev) | |||
77 | goto exit; | 78 | goto exit; |
78 | 79 | ||
79 | minor = port->number; | 80 | minor = port->number; |
80 | tty_register_device (usb_serial_tty_driver, minor, dev); | 81 | tty_register_device(usb_serial_tty_driver, minor, dev); |
81 | dev_info(&port->serial->dev->dev, | 82 | dev_info(&port->serial->dev->dev, |
82 | "%s converter now attached to ttyUSB%d\n", | 83 | "%s converter now attached to ttyUSB%d\n", |
83 | driver->description, minor); | 84 | driver->description, minor); |
84 | 85 | ||
@@ -86,7 +87,7 @@ exit: | |||
86 | return retval; | 87 | return retval; |
87 | } | 88 | } |
88 | 89 | ||
89 | static int usb_serial_device_remove (struct device *dev) | 90 | static int usb_serial_device_remove(struct device *dev) |
90 | { | 91 | { |
91 | struct usb_serial_driver *driver; | 92 | struct usb_serial_driver *driver; |
92 | struct usb_serial_port *port; | 93 | struct usb_serial_port *port; |
@@ -94,9 +95,8 @@ static int usb_serial_device_remove (struct device *dev) | |||
94 | int minor; | 95 | int minor; |
95 | 96 | ||
96 | port = to_usb_serial_port(dev); | 97 | port = to_usb_serial_port(dev); |
97 | if (!port) { | 98 | if (!port) |
98 | return -ENODEV; | 99 | return -ENODEV; |
99 | } | ||
100 | 100 | ||
101 | device_remove_file(&port->dev, &dev_attr_port_number); | 101 | device_remove_file(&port->dev, &dev_attr_port_number); |
102 | 102 | ||
@@ -107,12 +107,12 @@ static int usb_serial_device_remove (struct device *dev) | |||
107 | retval = -EIO; | 107 | retval = -EIO; |
108 | goto exit; | 108 | goto exit; |
109 | } | 109 | } |
110 | retval = driver->port_remove (port); | 110 | retval = driver->port_remove(port); |
111 | module_put(driver->driver.owner); | 111 | module_put(driver->driver.owner); |
112 | } | 112 | } |
113 | exit: | 113 | exit: |
114 | minor = port->number; | 114 | minor = port->number; |
115 | tty_unregister_device (usb_serial_tty_driver, minor); | 115 | tty_unregister_device(usb_serial_tty_driver, minor); |
116 | dev_info(dev, "%s converter now disconnected from ttyUSB%d\n", | 116 | dev_info(dev, "%s converter now disconnected from ttyUSB%d\n", |
117 | driver->description, minor); | 117 | driver->description, minor); |
118 | 118 | ||