aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/safe_serial.c
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-03-03 19:08:34 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-25 00:16:55 -0400
commit441b62c1edb986827154768d89bbac0ba779984f (patch)
tree13724c22d1b190a36f0ddbba38554e6c66bea6af /drivers/usb/serial/safe_serial.c
parent14722ef4acedc643f0b78b7165ceff2d300dae4d (diff)
USB: replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/safe_serial.c')
-rw-r--r--drivers/usb/serial/safe_serial.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c
index 353c54fa0580..3fe98a52b914 100644
--- a/drivers/usb/serial/safe_serial.c
+++ b/drivers/usb/serial/safe_serial.c
@@ -202,11 +202,11 @@ static void safe_read_bulk_callback (struct urb *urb)
202 int result; 202 int result;
203 int status = urb->status; 203 int status = urb->status;
204 204
205 dbg ("%s", __FUNCTION__); 205 dbg ("%s", __func__);
206 206
207 if (status) { 207 if (status) {
208 dbg("%s - nonzero read bulk status received: %d", 208 dbg("%s - nonzero read bulk status received: %d",
209 __FUNCTION__, status); 209 __func__, status);
210 return; 210 return;
211 } 211 }
212 212
@@ -232,18 +232,18 @@ static void safe_read_bulk_callback (struct urb *urb)
232 232
233 if (actual_length <= (length - 2)) { 233 if (actual_length <= (length - 2)) {
234 234
235 info ("%s - actual: %d", __FUNCTION__, actual_length); 235 info ("%s - actual: %d", __func__, actual_length);
236 236
237 for (i = 0; i < actual_length; i++) { 237 for (i = 0; i < actual_length; i++) {
238 tty_insert_flip_char (port->tty, data[i], 0); 238 tty_insert_flip_char (port->tty, data[i], 0);
239 } 239 }
240 tty_flip_buffer_push (port->tty); 240 tty_flip_buffer_push (port->tty);
241 } else { 241 } else {
242 err ("%s - inconsistent lengths %d:%d", __FUNCTION__, 242 err ("%s - inconsistent lengths %d:%d", __func__,
243 actual_length, length); 243 actual_length, length);
244 } 244 }
245 } else { 245 } else {
246 err ("%s - bad CRC %x", __FUNCTION__, fcs); 246 err ("%s - bad CRC %x", __func__, fcs);
247 } 247 }
248 } else { 248 } else {
249 for (i = 0; i < length; i++) { 249 for (i = 0; i < length; i++) {
@@ -259,7 +259,7 @@ static void safe_read_bulk_callback (struct urb *urb)
259 safe_read_bulk_callback, port); 259 safe_read_bulk_callback, port);
260 260
261 if ((result = usb_submit_urb (urb, GFP_ATOMIC))) { 261 if ((result = usb_submit_urb (urb, GFP_ATOMIC))) {
262 err ("%s - failed resubmitting read urb, error %d", __FUNCTION__, result); 262 err ("%s - failed resubmitting read urb, error %d", __func__, result);
263 } 263 }
264} 264}
265 265
@@ -274,7 +274,7 @@ static int safe_write (struct usb_serial_port *port, const unsigned char *buf, i
274 count); 274 count);
275 275
276 if (!port->write_urb) { 276 if (!port->write_urb) {
277 dbg ("%s - write urb NULL", __FUNCTION__); 277 dbg ("%s - write urb NULL", __func__);
278 return (0); 278 return (0);
279 } 279 }
280 280
@@ -282,17 +282,17 @@ static int safe_write (struct usb_serial_port *port, const unsigned char *buf, i
282 port->write_urb->transfer_buffer_length); 282 port->write_urb->transfer_buffer_length);
283 283
284 if (!port->write_urb->transfer_buffer_length) { 284 if (!port->write_urb->transfer_buffer_length) {
285 dbg ("%s - write urb transfer_buffer_length zero", __FUNCTION__); 285 dbg ("%s - write urb transfer_buffer_length zero", __func__);
286 return (0); 286 return (0);
287 } 287 }
288 if (count == 0) { 288 if (count == 0) {
289 dbg ("%s - write request of 0 bytes", __FUNCTION__); 289 dbg ("%s - write request of 0 bytes", __func__);
290 return (0); 290 return (0);
291 } 291 }
292 spin_lock_bh(&port->lock); 292 spin_lock_bh(&port->lock);
293 if (port->write_urb_busy) { 293 if (port->write_urb_busy) {
294 spin_unlock_bh(&port->lock); 294 spin_unlock_bh(&port->lock);
295 dbg("%s - already writing", __FUNCTION__); 295 dbg("%s - already writing", __func__);
296 return 0; 296 return 0;
297 } 297 }
298 port->write_urb_busy = 1; 298 port->write_urb_busy = 1;
@@ -332,7 +332,7 @@ static int safe_write (struct usb_serial_port *port, const unsigned char *buf, i
332 port->write_urb->transfer_buffer_length = count; 332 port->write_urb->transfer_buffer_length = count;
333 } 333 }
334 334
335 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, port->write_urb->transfer_buffer); 335 usb_serial_debug_data(debug, &port->dev, __func__, count, port->write_urb->transfer_buffer);
336#ifdef ECHO_TX 336#ifdef ECHO_TX
337 { 337 {
338 int i; 338 int i;
@@ -349,10 +349,10 @@ static int safe_write (struct usb_serial_port *port, const unsigned char *buf, i
349 port->write_urb->dev = port->serial->dev; 349 port->write_urb->dev = port->serial->dev;
350 if ((result = usb_submit_urb (port->write_urb, GFP_KERNEL))) { 350 if ((result = usb_submit_urb (port->write_urb, GFP_KERNEL))) {
351 port->write_urb_busy = 0; 351 port->write_urb_busy = 0;
352 err ("%s - failed submitting write urb, error %d", __FUNCTION__, result); 352 err ("%s - failed submitting write urb, error %d", __func__, result);
353 return 0; 353 return 0;
354 } 354 }
355 dbg ("%s urb: %p submitted", __FUNCTION__, port->write_urb); 355 dbg ("%s urb: %p submitted", __func__, port->write_urb);
356 356
357 return (count); 357 return (count);
358} 358}
@@ -361,7 +361,7 @@ static int safe_write_room (struct usb_serial_port *port)
361{ 361{
362 int room = 0; // Default: no room 362 int room = 0; // Default: no room
363 363
364 dbg ("%s", __FUNCTION__); 364 dbg ("%s", __func__);
365 365
366 if (port->write_urb_busy) 366 if (port->write_urb_busy)
367 room = port->bulk_out_size - (safe ? 2 : 0); 367 room = port->bulk_out_size - (safe ? 2 : 0);