Skip to content

Commit

Permalink
usb-serial-bus: tidy coding style
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Jul 22, 2008
1 parent b69c149 commit c97611c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions drivers/usb/serial/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
#include <linux/usb.h>
#include <linux/usb/serial.h>

static int usb_serial_device_match (struct device *dev, struct device_driver *drv)
static int usb_serial_device_match(struct device *dev,
struct device_driver *drv)
{
struct usb_serial_driver *driver;
const struct usb_serial_port *port;
Expand Down Expand Up @@ -46,7 +47,7 @@ static ssize_t show_port_number(struct device *dev,

static DEVICE_ATTR(port_number, S_IRUGO, show_port_number, NULL);

static int usb_serial_device_probe (struct device *dev)
static int usb_serial_device_probe(struct device *dev)
{
struct usb_serial_driver *driver;
struct usb_serial_port *port;
Expand All @@ -66,7 +67,7 @@ static int usb_serial_device_probe (struct device *dev)
retval = -EIO;
goto exit;
}
retval = driver->port_probe (port);
retval = driver->port_probe(port);
module_put(driver->driver.owner);
if (retval)
goto exit;
Expand All @@ -77,26 +78,25 @@ static int usb_serial_device_probe (struct device *dev)
goto exit;

minor = port->number;
tty_register_device (usb_serial_tty_driver, minor, dev);
dev_info(&port->serial->dev->dev,
tty_register_device(usb_serial_tty_driver, minor, dev);
dev_info(&port->serial->dev->dev,
"%s converter now attached to ttyUSB%d\n",
driver->description, minor);

exit:
return retval;
}

static int usb_serial_device_remove (struct device *dev)
static int usb_serial_device_remove(struct device *dev)
{
struct usb_serial_driver *driver;
struct usb_serial_port *port;
int retval = 0;
int minor;

port = to_usb_serial_port(dev);
if (!port) {
if (!port)
return -ENODEV;
}

device_remove_file(&port->dev, &dev_attr_port_number);

Expand All @@ -107,12 +107,12 @@ static int usb_serial_device_remove (struct device *dev)
retval = -EIO;
goto exit;
}
retval = driver->port_remove (port);
retval = driver->port_remove(port);
module_put(driver->driver.owner);
}
exit:
minor = port->number;
tty_unregister_device (usb_serial_tty_driver, minor);
tty_unregister_device(usb_serial_tty_driver, minor);
dev_info(dev, "%s converter now disconnected from ttyUSB%d\n",
driver->description, minor);

Expand Down

0 comments on commit c97611c

Please sign in to comment.