diff options
Diffstat (limited to 'drivers/usb/serial/navman.c')
-rw-r--r-- | drivers/usb/serial/navman.c | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/drivers/usb/serial/navman.c b/drivers/usb/serial/navman.c index 29ab6eb5b536..d95452cc076d 100644 --- a/drivers/usb/serial/navman.c +++ b/drivers/usb/serial/navman.c | |||
@@ -30,13 +30,6 @@ static const struct usb_device_id id_table[] = { | |||
30 | }; | 30 | }; |
31 | MODULE_DEVICE_TABLE(usb, id_table); | 31 | MODULE_DEVICE_TABLE(usb, id_table); |
32 | 32 | ||
33 | static struct usb_driver navman_driver = { | ||
34 | .name = "navman", | ||
35 | .probe = usb_serial_probe, | ||
36 | .disconnect = usb_serial_disconnect, | ||
37 | .id_table = id_table, | ||
38 | }; | ||
39 | |||
40 | static void navman_read_int_callback(struct urb *urb) | 33 | static void navman_read_int_callback(struct urb *urb) |
41 | { | 34 | { |
42 | struct usb_serial_port *port = urb->context; | 35 | struct usb_serial_port *port = urb->context; |
@@ -53,12 +46,12 @@ static void navman_read_int_callback(struct urb *urb) | |||
53 | case -ENOENT: | 46 | case -ENOENT: |
54 | case -ESHUTDOWN: | 47 | case -ESHUTDOWN: |
55 | /* this urb is terminated, clean up */ | 48 | /* this urb is terminated, clean up */ |
56 | dbg("%s - urb shutting down with status: %d", | 49 | dev_dbg(&port->dev, "%s - urb shutting down with status: %d\n", |
57 | __func__, status); | 50 | __func__, status); |
58 | return; | 51 | return; |
59 | default: | 52 | default: |
60 | dbg("%s - nonzero urb status received: %d", | 53 | dev_dbg(&port->dev, "%s - nonzero urb status received: %d\n", |
61 | __func__, status); | 54 | __func__, status); |
62 | goto exit; | 55 | goto exit; |
63 | } | 56 | } |
64 | 57 | ||
@@ -84,10 +77,9 @@ static int navman_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
84 | { | 77 | { |
85 | int result = 0; | 78 | int result = 0; |
86 | 79 | ||
87 | dbg("%s - port %d", __func__, port->number); | ||
88 | |||
89 | if (port->interrupt_in_urb) { | 80 | if (port->interrupt_in_urb) { |
90 | dbg("%s - adding interrupt input for treo", __func__); | 81 | dev_dbg(&port->dev, "%s - adding interrupt input for treo\n", |
82 | __func__); | ||
91 | result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); | 83 | result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); |
92 | if (result) | 84 | if (result) |
93 | dev_err(&port->dev, | 85 | dev_err(&port->dev, |
@@ -99,16 +91,12 @@ static int navman_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
99 | 91 | ||
100 | static void navman_close(struct usb_serial_port *port) | 92 | static void navman_close(struct usb_serial_port *port) |
101 | { | 93 | { |
102 | dbg("%s - port %d", __func__, port->number); | ||
103 | |||
104 | usb_kill_urb(port->interrupt_in_urb); | 94 | usb_kill_urb(port->interrupt_in_urb); |
105 | } | 95 | } |
106 | 96 | ||
107 | static int navman_write(struct tty_struct *tty, struct usb_serial_port *port, | 97 | static int navman_write(struct tty_struct *tty, struct usb_serial_port *port, |
108 | const unsigned char *buf, int count) | 98 | const unsigned char *buf, int count) |
109 | { | 99 | { |
110 | dbg("%s - port %d", __func__, port->number); | ||
111 | |||
112 | /* | 100 | /* |
113 | * This device can't write any data, only read from the device | 101 | * This device can't write any data, only read from the device |
114 | */ | 102 | */ |
@@ -132,7 +120,7 @@ static struct usb_serial_driver * const serial_drivers[] = { | |||
132 | &navman_device, NULL | 120 | &navman_device, NULL |
133 | }; | 121 | }; |
134 | 122 | ||
135 | module_usb_serial_driver(navman_driver, serial_drivers); | 123 | module_usb_serial_driver(serial_drivers, id_table); |
136 | 124 | ||
137 | MODULE_LICENSE("GPL"); | 125 | MODULE_LICENSE("GPL"); |
138 | 126 | ||