diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-14 14:50:35 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-14 14:50:35 -0400 |
commit | 4f0c64120041fc92a35cd1fe84562b7abcd7aeb7 (patch) | |
tree | 2a32b7ecd24aba192e843febb6ef5518d2ab8936 /drivers/usb/serial/ssu100.c | |
parent | 8c8e87bc23acb4e9ed42c3d1b1d9fbf42f368ea2 (diff) |
USB: serial: ssu100.c: remove dbg() usage
dbg() was a very old USB-serial-specific macro.
This patch removes it from being used in the
driver and uses dev_dbg() instead.
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/ssu100.c')
-rw-r--r-- | drivers/usb/serial/ssu100.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/usb/serial/ssu100.c b/drivers/usb/serial/ssu100.c index 3fee23bf0c14..e719661899df 100644 --- a/drivers/usb/serial/ssu100.c +++ b/drivers/usb/serial/ssu100.c | |||
@@ -135,7 +135,7 @@ static inline int update_mctrl(struct usb_device *dev, unsigned int set, | |||
135 | int result; | 135 | int result; |
136 | 136 | ||
137 | if (((set | clear) & (TIOCM_DTR | TIOCM_RTS)) == 0) { | 137 | if (((set | clear) & (TIOCM_DTR | TIOCM_RTS)) == 0) { |
138 | dbg("%s - DTR|RTS not being set|cleared", __func__); | 138 | dev_dbg(&dev->dev, "%s - DTR|RTS not being set|cleared\n", __func__); |
139 | return 0; /* no change */ | 139 | return 0; /* no change */ |
140 | } | 140 | } |
141 | 141 | ||
@@ -148,7 +148,7 @@ static inline int update_mctrl(struct usb_device *dev, unsigned int set, | |||
148 | 148 | ||
149 | result = ssu100_setregister(dev, 0, UART_MCR, urb_value); | 149 | result = ssu100_setregister(dev, 0, UART_MCR, urb_value); |
150 | if (result < 0) | 150 | if (result < 0) |
151 | dbg("%s Error from MODEM_CTRL urb", __func__); | 151 | dev_dbg(&dev->dev, "%s Error from MODEM_CTRL urb\n", __func__); |
152 | 152 | ||
153 | return result; | 153 | return result; |
154 | } | 154 | } |
@@ -164,7 +164,7 @@ static int ssu100_initdevice(struct usb_device *dev) | |||
164 | 164 | ||
165 | result = ssu100_getdevice(dev, data); | 165 | result = ssu100_getdevice(dev, data); |
166 | if (result < 0) { | 166 | if (result < 0) { |
167 | dbg("%s - get_device failed %i", __func__, result); | 167 | dev_dbg(&dev->dev, "%s - get_device failed %i\n", __func__, result); |
168 | goto out; | 168 | goto out; |
169 | } | 169 | } |
170 | 170 | ||
@@ -172,25 +172,25 @@ static int ssu100_initdevice(struct usb_device *dev) | |||
172 | 172 | ||
173 | result = ssu100_setdevice(dev, data); | 173 | result = ssu100_setdevice(dev, data); |
174 | if (result < 0) { | 174 | if (result < 0) { |
175 | dbg("%s - setdevice failed %i", __func__, result); | 175 | dev_dbg(&dev->dev, "%s - setdevice failed %i\n", __func__, result); |
176 | goto out; | 176 | goto out; |
177 | } | 177 | } |
178 | 178 | ||
179 | result = ssu100_control_msg(dev, QT_GET_SET_PREBUF_TRIG_LVL, 128, 0); | 179 | result = ssu100_control_msg(dev, QT_GET_SET_PREBUF_TRIG_LVL, 128, 0); |
180 | if (result < 0) { | 180 | if (result < 0) { |
181 | dbg("%s - set prebuffer level failed %i", __func__, result); | 181 | dev_dbg(&dev->dev, "%s - set prebuffer level failed %i\n", __func__, result); |
182 | goto out; | 182 | goto out; |
183 | } | 183 | } |
184 | 184 | ||
185 | result = ssu100_control_msg(dev, QT_SET_ATF, ATC_DISABLED, 0); | 185 | result = ssu100_control_msg(dev, QT_SET_ATF, ATC_DISABLED, 0); |
186 | if (result < 0) { | 186 | if (result < 0) { |
187 | dbg("%s - set ATFprebuffer level failed %i", __func__, result); | 187 | dev_dbg(&dev->dev, "%s - set ATFprebuffer level failed %i\n", __func__, result); |
188 | goto out; | 188 | goto out; |
189 | } | 189 | } |
190 | 190 | ||
191 | result = ssu100_getdevice(dev, data); | 191 | result = ssu100_getdevice(dev, data); |
192 | if (result < 0) { | 192 | if (result < 0) { |
193 | dbg("%s - get_device failed %i", __func__, result); | 193 | dev_dbg(&dev->dev, "%s - get_device failed %i\n", __func__, result); |
194 | goto out; | 194 | goto out; |
195 | } | 195 | } |
196 | 196 | ||
@@ -201,7 +201,7 @@ static int ssu100_initdevice(struct usb_device *dev) | |||
201 | 201 | ||
202 | result = ssu100_setdevice(dev, data); | 202 | result = ssu100_setdevice(dev, data); |
203 | if (result < 0) { | 203 | if (result < 0) { |
204 | dbg("%s - setdevice failed %i", __func__, result); | 204 | dev_dbg(&dev->dev, "%s - setdevice failed %i\n", __func__, result); |
205 | goto out; | 205 | goto out; |
206 | } | 206 | } |
207 | 207 | ||
@@ -249,7 +249,7 @@ static void ssu100_set_termios(struct tty_struct *tty, | |||
249 | if (!baud) | 249 | if (!baud) |
250 | baud = 9600; | 250 | baud = 9600; |
251 | 251 | ||
252 | dbg("%s - got baud = %d\n", __func__, baud); | 252 | dev_dbg(&port->dev, "%s - got baud = %d\n", __func__, baud); |
253 | 253 | ||
254 | 254 | ||
255 | divisor = MAX_BAUD_RATE / baud; | 255 | divisor = MAX_BAUD_RATE / baud; |
@@ -261,7 +261,7 @@ static void ssu100_set_termios(struct tty_struct *tty, | |||
261 | 261 | ||
262 | result = ssu100_control_msg(dev, QT_GET_SET_UART, divisor, urb_value); | 262 | result = ssu100_control_msg(dev, QT_GET_SET_UART, divisor, urb_value); |
263 | if (result < 0) | 263 | if (result < 0) |
264 | dbg("%s - set uart failed", __func__); | 264 | dev_dbg(&port->dev, "%s - set uart failed\n", __func__); |
265 | 265 | ||
266 | if (cflag & CRTSCTS) | 266 | if (cflag & CRTSCTS) |
267 | result = ssu100_control_msg(dev, QT_HW_FLOW_CONTROL_MASK, | 267 | result = ssu100_control_msg(dev, QT_HW_FLOW_CONTROL_MASK, |
@@ -270,7 +270,7 @@ static void ssu100_set_termios(struct tty_struct *tty, | |||
270 | result = ssu100_control_msg(dev, QT_HW_FLOW_CONTROL_MASK, | 270 | result = ssu100_control_msg(dev, QT_HW_FLOW_CONTROL_MASK, |
271 | 0, 0); | 271 | 0, 0); |
272 | if (result < 0) | 272 | if (result < 0) |
273 | dbg("%s - set HW flow control failed", __func__); | 273 | dev_dbg(&port->dev, "%s - set HW flow control failed\n", __func__); |
274 | 274 | ||
275 | if (I_IXOFF(tty) || I_IXON(tty)) { | 275 | if (I_IXOFF(tty) || I_IXON(tty)) { |
276 | u16 x = ((u16)(START_CHAR(tty) << 8) | (u16)(STOP_CHAR(tty))); | 276 | u16 x = ((u16)(START_CHAR(tty) << 8) | (u16)(STOP_CHAR(tty))); |
@@ -282,7 +282,7 @@ static void ssu100_set_termios(struct tty_struct *tty, | |||
282 | 0, 0); | 282 | 0, 0); |
283 | 283 | ||
284 | if (result < 0) | 284 | if (result < 0) |
285 | dbg("%s - set SW flow control failed", __func__); | 285 | dev_dbg(&port->dev, "%s - set SW flow control failed\n", __func__); |
286 | 286 | ||
287 | } | 287 | } |
288 | 288 | ||
@@ -304,7 +304,7 @@ static int ssu100_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
304 | QT_TRANSFER_IN, 0x01, | 304 | QT_TRANSFER_IN, 0x01, |
305 | 0, data, 2, 300); | 305 | 0, data, 2, 300); |
306 | if (result < 0) { | 306 | if (result < 0) { |
307 | dbg("%s - open failed %i", __func__, result); | 307 | dev_dbg(&port->dev, "%s - open failed %i\n", __func__, result); |
308 | kfree(data); | 308 | kfree(data); |
309 | return result; | 309 | return result; |
310 | } | 310 | } |
@@ -319,7 +319,7 @@ static int ssu100_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
319 | /* set to 9600 */ | 319 | /* set to 9600 */ |
320 | result = ssu100_control_msg(dev, QT_GET_SET_UART, 0x30, 0x0300); | 320 | result = ssu100_control_msg(dev, QT_GET_SET_UART, 0x30, 0x0300); |
321 | if (result < 0) | 321 | if (result < 0) |
322 | dbg("%s - set uart failed", __func__); | 322 | dev_dbg(&port->dev, "%s - set uart failed\n", __func__); |
323 | 323 | ||
324 | if (tty) | 324 | if (tty) |
325 | ssu100_set_termios(tty, port, tty->termios); | 325 | ssu100_set_termios(tty, port, tty->termios); |
@@ -423,7 +423,7 @@ static int ssu100_ioctl(struct tty_struct *tty, | |||
423 | { | 423 | { |
424 | struct usb_serial_port *port = tty->driver_data; | 424 | struct usb_serial_port *port = tty->driver_data; |
425 | 425 | ||
426 | dbg("%s cmd 0x%04x", __func__, cmd); | 426 | dev_dbg(&port->dev, "%s cmd 0x%04x\n", __func__, cmd); |
427 | 427 | ||
428 | switch (cmd) { | 428 | switch (cmd) { |
429 | case TIOCGSERIAL: | 429 | case TIOCGSERIAL: |
@@ -437,7 +437,7 @@ static int ssu100_ioctl(struct tty_struct *tty, | |||
437 | break; | 437 | break; |
438 | } | 438 | } |
439 | 439 | ||
440 | dbg("%s arg not supported", __func__); | 440 | dev_dbg(&port->dev, "%s arg not supported\n", __func__); |
441 | 441 | ||
442 | return -ENOIOCTLCMD; | 442 | return -ENOIOCTLCMD; |
443 | } | 443 | } |