aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/ir-usb.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/ir-usb.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/ir-usb.c')
-rw-r--r--drivers/usb/serial/ir-usb.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c
index 82e12f8d600a..496009cff3a8 100644
--- a/drivers/usb/serial/ir-usb.c
+++ b/drivers/usb/serial/ir-usb.c
@@ -195,16 +195,16 @@ static struct irda_class_desc *irda_usb_find_class_desc(struct usb_device *dev,
195 USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 195 USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
196 0, ifnum, desc, sizeof(*desc), 1000); 196 0, ifnum, desc, sizeof(*desc), 1000);
197 197
198 dbg("%s - ret=%d", __FUNCTION__, ret); 198 dbg("%s - ret=%d", __func__, ret);
199 if (ret < sizeof(*desc)) { 199 if (ret < sizeof(*desc)) {
200 dbg("%s - class descriptor read %s (%d)", 200 dbg("%s - class descriptor read %s (%d)",
201 __FUNCTION__, 201 __func__,
202 (ret<0) ? "failed" : "too short", 202 (ret<0) ? "failed" : "too short",
203 ret); 203 ret);
204 goto error; 204 goto error;
205 } 205 }
206 if (desc->bDescriptorType != USB_DT_IRDA) { 206 if (desc->bDescriptorType != USB_DT_IRDA) {
207 dbg("%s - bad class descriptor type", __FUNCTION__); 207 dbg("%s - bad class descriptor type", __func__);
208 goto error; 208 goto error;
209 } 209 }
210 210
@@ -248,7 +248,7 @@ static int ir_startup (struct usb_serial *serial)
248 } 248 }
249 249
250 dbg ("%s - Baud rates supported:%s%s%s%s%s%s%s%s%s", 250 dbg ("%s - Baud rates supported:%s%s%s%s%s%s%s%s%s",
251 __FUNCTION__, 251 __func__,
252 (irda_desc->wBaudRate & 0x0001) ? " 2400" : "", 252 (irda_desc->wBaudRate & 0x0001) ? " 2400" : "",
253 (irda_desc->wBaudRate & 0x0002) ? " 9600" : "", 253 (irda_desc->wBaudRate & 0x0002) ? " 9600" : "",
254 (irda_desc->wBaudRate & 0x0004) ? " 19200" : "", 254 (irda_desc->wBaudRate & 0x0004) ? " 19200" : "",
@@ -281,13 +281,13 @@ static int ir_open (struct usb_serial_port *port, struct file *filp)
281 char *buffer; 281 char *buffer;
282 int result = 0; 282 int result = 0;
283 283
284 dbg("%s - port %d", __FUNCTION__, port->number); 284 dbg("%s - port %d", __func__, port->number);
285 285
286 if (buffer_size) { 286 if (buffer_size) {
287 /* override the default buffer sizes */ 287 /* override the default buffer sizes */
288 buffer = kmalloc (buffer_size, GFP_KERNEL); 288 buffer = kmalloc (buffer_size, GFP_KERNEL);
289 if (!buffer) { 289 if (!buffer) {
290 dev_err (&port->dev, "%s - out of memory.\n", __FUNCTION__); 290 dev_err (&port->dev, "%s - out of memory.\n", __func__);
291 return -ENOMEM; 291 return -ENOMEM;
292 } 292 }
293 kfree (port->read_urb->transfer_buffer); 293 kfree (port->read_urb->transfer_buffer);
@@ -296,7 +296,7 @@ static int ir_open (struct usb_serial_port *port, struct file *filp)
296 296
297 buffer = kmalloc (buffer_size, GFP_KERNEL); 297 buffer = kmalloc (buffer_size, GFP_KERNEL);
298 if (!buffer) { 298 if (!buffer) {
299 dev_err (&port->dev, "%s - out of memory.\n", __FUNCTION__); 299 dev_err (&port->dev, "%s - out of memory.\n", __func__);
300 return -ENOMEM; 300 return -ENOMEM;
301 } 301 }
302 kfree (port->write_urb->transfer_buffer); 302 kfree (port->write_urb->transfer_buffer);
@@ -316,14 +316,14 @@ static int ir_open (struct usb_serial_port *port, struct file *filp)
316 port); 316 port);
317 result = usb_submit_urb(port->read_urb, GFP_KERNEL); 317 result = usb_submit_urb(port->read_urb, GFP_KERNEL);
318 if (result) 318 if (result)
319 dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result); 319 dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __func__, result);
320 320
321 return result; 321 return result;
322} 322}
323 323
324static void ir_close (struct usb_serial_port *port, struct file * filp) 324static void ir_close (struct usb_serial_port *port, struct file * filp)
325{ 325{
326 dbg("%s - port %d", __FUNCTION__, port->number); 326 dbg("%s - port %d", __func__, port->number);
327 327
328 /* shutdown our bulk read */ 328 /* shutdown our bulk read */
329 usb_kill_urb(port->read_urb); 329 usb_kill_urb(port->read_urb);
@@ -335,10 +335,10 @@ static int ir_write (struct usb_serial_port *port, const unsigned char *buf, int
335 int result; 335 int result;
336 int transfer_size; 336 int transfer_size;
337 337
338 dbg("%s - port = %d, count = %d", __FUNCTION__, port->number, count); 338 dbg("%s - port = %d, count = %d", __func__, port->number, count);
339 339
340 if (!port->tty) { 340 if (!port->tty) {
341 dev_err (&port->dev, "%s - no tty???\n", __FUNCTION__); 341 dev_err (&port->dev, "%s - no tty???\n", __func__);
342 return 0; 342 return 0;
343 } 343 }
344 344
@@ -348,7 +348,7 @@ static int ir_write (struct usb_serial_port *port, const unsigned char *buf, int
348 spin_lock_bh(&port->lock); 348 spin_lock_bh(&port->lock);
349 if (port->write_urb_busy) { 349 if (port->write_urb_busy) {
350 spin_unlock_bh(&port->lock); 350 spin_unlock_bh(&port->lock);
351 dbg("%s - already writing", __FUNCTION__); 351 dbg("%s - already writing", __func__);
352 return 0; 352 return 0;
353 } 353 }
354 port->write_urb_busy = 1; 354 port->write_urb_busy = 1;
@@ -384,7 +384,7 @@ static int ir_write (struct usb_serial_port *port, const unsigned char *buf, int
384 result = usb_submit_urb (port->write_urb, GFP_ATOMIC); 384 result = usb_submit_urb (port->write_urb, GFP_ATOMIC);
385 if (result) { 385 if (result) {
386 port->write_urb_busy = 0; 386 port->write_urb_busy = 0;
387 dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result); 387 dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __func__, result);
388 } else 388 } else
389 result = transfer_size; 389 result = transfer_size;
390 390
@@ -396,19 +396,19 @@ static void ir_write_bulk_callback (struct urb *urb)
396 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 396 struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
397 int status = urb->status; 397 int status = urb->status;
398 398
399 dbg("%s - port %d", __FUNCTION__, port->number); 399 dbg("%s - port %d", __func__, port->number);
400 400
401 port->write_urb_busy = 0; 401 port->write_urb_busy = 0;
402 if (status) { 402 if (status) {
403 dbg("%s - nonzero write bulk status received: %d", 403 dbg("%s - nonzero write bulk status received: %d",
404 __FUNCTION__, status); 404 __func__, status);
405 return; 405 return;
406 } 406 }
407 407
408 usb_serial_debug_data ( 408 usb_serial_debug_data (
409 debug, 409 debug,
410 &port->dev, 410 &port->dev,
411 __FUNCTION__, 411 __func__,
412 urb->actual_length, 412 urb->actual_length,
413 urb->transfer_buffer); 413 urb->transfer_buffer);
414 414
@@ -423,10 +423,10 @@ static void ir_read_bulk_callback (struct urb *urb)
423 int result; 423 int result;
424 int status = urb->status; 424 int status = urb->status;
425 425
426 dbg("%s - port %d", __FUNCTION__, port->number); 426 dbg("%s - port %d", __func__, port->number);
427 427
428 if (!port->open_count) { 428 if (!port->open_count) {
429 dbg("%s - port closed.", __FUNCTION__); 429 dbg("%s - port closed.", __func__);
430 return; 430 return;
431 } 431 }
432 432
@@ -444,7 +444,7 @@ static void ir_read_bulk_callback (struct urb *urb)
444 usb_serial_debug_data ( 444 usb_serial_debug_data (
445 debug, 445 debug,
446 &port->dev, 446 &port->dev,
447 __FUNCTION__, 447 __func__,
448 urb->actual_length, 448 urb->actual_length,
449 data); 449 data);
450 450
@@ -477,13 +477,13 @@ static void ir_read_bulk_callback (struct urb *urb)
477 result = usb_submit_urb(port->read_urb, GFP_ATOMIC); 477 result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
478 if (result) 478 if (result)
479 dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", 479 dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n",
480 __FUNCTION__, result); 480 __func__, result);
481 481
482 break ; 482 break ;
483 483
484 default: 484 default:
485 dbg("%s - nonzero read bulk status received: %d", 485 dbg("%s - nonzero read bulk status received: %d",
486 __FUNCTION__, 486 __func__,
487 status); 487 status);
488 break ; 488 break ;
489 489
@@ -499,7 +499,7 @@ static void ir_set_termios (struct usb_serial_port *port, struct ktermios *old_t
499 speed_t baud; 499 speed_t baud;
500 int ir_baud; 500 int ir_baud;
501 501
502 dbg("%s - port %d", __FUNCTION__, port->number); 502 dbg("%s - port %d", __func__, port->number);
503 503
504 baud = tty_get_baud_rate(port->tty); 504 baud = tty_get_baud_rate(port->tty);
505 505
@@ -551,7 +551,7 @@ static void ir_set_termios (struct usb_serial_port *port, struct ktermios *old_t
551 551
552 result = usb_submit_urb (port->write_urb, GFP_KERNEL); 552 result = usb_submit_urb (port->write_urb, GFP_KERNEL);
553 if (result) 553 if (result)
554 dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result); 554 dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __func__, result);
555 555
556 /* Only speed changes are supported */ 556 /* Only speed changes are supported */
557 tty_termios_copy_hw(port->tty->termios, old_termios); 557 tty_termios_copy_hw(port->tty->termios, old_termios);