aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/empeg.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/empeg.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/empeg.c')
-rw-r--r--drivers/usb/serial/empeg.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c
index 2cf821771175..5f731d4912f7 100644
--- a/drivers/usb/serial/empeg.c
+++ b/drivers/usb/serial/empeg.c
@@ -150,7 +150,7 @@ static int empeg_open (struct usb_serial_port *port, struct file *filp)
150 struct usb_serial *serial = port->serial; 150 struct usb_serial *serial = port->serial;
151 int result = 0; 151 int result = 0;
152 152
153 dbg("%s - port %d", __FUNCTION__, port->number); 153 dbg("%s - port %d", __func__, port->number);
154 154
155 /* Force default termio settings */ 155 /* Force default termio settings */
156 empeg_set_termios (port, NULL) ; 156 empeg_set_termios (port, NULL) ;
@@ -172,7 +172,7 @@ static int empeg_open (struct usb_serial_port *port, struct file *filp)
172 result = usb_submit_urb(port->read_urb, GFP_KERNEL); 172 result = usb_submit_urb(port->read_urb, GFP_KERNEL);
173 173
174 if (result) 174 if (result)
175 dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result); 175 dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __func__, result);
176 176
177 return result; 177 return result;
178} 178}
@@ -180,7 +180,7 @@ static int empeg_open (struct usb_serial_port *port, struct file *filp)
180 180
181static void empeg_close (struct usb_serial_port *port, struct file * filp) 181static void empeg_close (struct usb_serial_port *port, struct file * filp)
182{ 182{
183 dbg("%s - port %d", __FUNCTION__, port->number); 183 dbg("%s - port %d", __func__, port->number);
184 184
185 /* shutdown our bulk read */ 185 /* shutdown our bulk read */
186 usb_kill_urb(port->read_urb); 186 usb_kill_urb(port->read_urb);
@@ -200,7 +200,7 @@ static int empeg_write (struct usb_serial_port *port, const unsigned char *buf,
200 int bytes_sent = 0; 200 int bytes_sent = 0;
201 int transfer_size; 201 int transfer_size;
202 202
203 dbg("%s - port %d", __FUNCTION__, port->number); 203 dbg("%s - port %d", __func__, port->number);
204 204
205 while (count > 0) { 205 while (count > 0) {
206 206
@@ -219,14 +219,14 @@ static int empeg_write (struct usb_serial_port *port, const unsigned char *buf,
219 spin_unlock_irqrestore (&write_urb_pool_lock, flags); 219 spin_unlock_irqrestore (&write_urb_pool_lock, flags);
220 220
221 if (urb == NULL) { 221 if (urb == NULL) {
222 dbg("%s - no more free urbs", __FUNCTION__); 222 dbg("%s - no more free urbs", __func__);
223 goto exit; 223 goto exit;
224 } 224 }
225 225
226 if (urb->transfer_buffer == NULL) { 226 if (urb->transfer_buffer == NULL) {
227 urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_ATOMIC); 227 urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_ATOMIC);
228 if (urb->transfer_buffer == NULL) { 228 if (urb->transfer_buffer == NULL) {
229 dev_err(&port->dev, "%s no more kernel memory...\n", __FUNCTION__); 229 dev_err(&port->dev, "%s no more kernel memory...\n", __func__);
230 goto exit; 230 goto exit;
231 } 231 }
232 } 232 }
@@ -235,7 +235,7 @@ static int empeg_write (struct usb_serial_port *port, const unsigned char *buf,
235 235
236 memcpy (urb->transfer_buffer, current_position, transfer_size); 236 memcpy (urb->transfer_buffer, current_position, transfer_size);
237 237
238 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, transfer_size, urb->transfer_buffer); 238 usb_serial_debug_data(debug, &port->dev, __func__, transfer_size, urb->transfer_buffer);
239 239
240 /* build up our urb */ 240 /* build up our urb */
241 usb_fill_bulk_urb ( 241 usb_fill_bulk_urb (
@@ -251,7 +251,7 @@ static int empeg_write (struct usb_serial_port *port, const unsigned char *buf,
251 /* send it down the pipe */ 251 /* send it down the pipe */
252 status = usb_submit_urb(urb, GFP_ATOMIC); 252 status = usb_submit_urb(urb, GFP_ATOMIC);
253 if (status) { 253 if (status) {
254 dev_err(&port->dev, "%s - usb_submit_urb(write bulk) failed with status = %d\n", __FUNCTION__, status); 254 dev_err(&port->dev, "%s - usb_submit_urb(write bulk) failed with status = %d\n", __func__, status);
255 bytes_sent = status; 255 bytes_sent = status;
256 break; 256 break;
257 } 257 }
@@ -275,7 +275,7 @@ static int empeg_write_room (struct usb_serial_port *port)
275 int i; 275 int i;
276 int room = 0; 276 int room = 0;
277 277
278 dbg("%s - port %d", __FUNCTION__, port->number); 278 dbg("%s - port %d", __func__, port->number);
279 279
280 spin_lock_irqsave (&write_urb_pool_lock, flags); 280 spin_lock_irqsave (&write_urb_pool_lock, flags);
281 281
@@ -288,7 +288,7 @@ static int empeg_write_room (struct usb_serial_port *port)
288 288
289 spin_unlock_irqrestore (&write_urb_pool_lock, flags); 289 spin_unlock_irqrestore (&write_urb_pool_lock, flags);
290 290
291 dbg("%s - returns %d", __FUNCTION__, room); 291 dbg("%s - returns %d", __func__, room);
292 292
293 return (room); 293 return (room);
294 294
@@ -301,7 +301,7 @@ static int empeg_chars_in_buffer (struct usb_serial_port *port)
301 int i; 301 int i;
302 int chars = 0; 302 int chars = 0;
303 303
304 dbg("%s - port %d", __FUNCTION__, port->number); 304 dbg("%s - port %d", __func__, port->number);
305 305
306 spin_lock_irqsave (&write_urb_pool_lock, flags); 306 spin_lock_irqsave (&write_urb_pool_lock, flags);
307 307
@@ -314,7 +314,7 @@ static int empeg_chars_in_buffer (struct usb_serial_port *port)
314 314
315 spin_unlock_irqrestore (&write_urb_pool_lock, flags); 315 spin_unlock_irqrestore (&write_urb_pool_lock, flags);
316 316
317 dbg("%s - returns %d", __FUNCTION__, chars); 317 dbg("%s - returns %d", __func__, chars);
318 318
319 return (chars); 319 return (chars);
320 320
@@ -326,11 +326,11 @@ static void empeg_write_bulk_callback (struct urb *urb)
326 struct usb_serial_port *port = urb->context; 326 struct usb_serial_port *port = urb->context;
327 int status = urb->status; 327 int status = urb->status;
328 328
329 dbg("%s - port %d", __FUNCTION__, port->number); 329 dbg("%s - port %d", __func__, port->number);
330 330
331 if (status) { 331 if (status) {
332 dbg("%s - nonzero write bulk status received: %d", 332 dbg("%s - nonzero write bulk status received: %d",
333 __FUNCTION__, status); 333 __func__, status);
334 return; 334 return;
335 } 335 }
336 336
@@ -346,15 +346,15 @@ static void empeg_read_bulk_callback (struct urb *urb)
346 int result; 346 int result;
347 int status = urb->status; 347 int status = urb->status;
348 348
349 dbg("%s - port %d", __FUNCTION__, port->number); 349 dbg("%s - port %d", __func__, port->number);
350 350
351 if (status) { 351 if (status) {
352 dbg("%s - nonzero read bulk status received: %d", 352 dbg("%s - nonzero read bulk status received: %d",
353 __FUNCTION__, status); 353 __func__, status);
354 return; 354 return;
355 } 355 }
356 356
357 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); 357 usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data);
358 358
359 tty = port->tty; 359 tty = port->tty;
360 360
@@ -379,7 +379,7 @@ static void empeg_read_bulk_callback (struct urb *urb)
379 result = usb_submit_urb(port->read_urb, GFP_ATOMIC); 379 result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
380 380
381 if (result) 381 if (result)
382 dev_err(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result); 382 dev_err(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __func__, result);
383 383
384 return; 384 return;
385 385
@@ -388,7 +388,7 @@ static void empeg_read_bulk_callback (struct urb *urb)
388 388
389static void empeg_throttle (struct usb_serial_port *port) 389static void empeg_throttle (struct usb_serial_port *port)
390{ 390{
391 dbg("%s - port %d", __FUNCTION__, port->number); 391 dbg("%s - port %d", __func__, port->number);
392 usb_kill_urb(port->read_urb); 392 usb_kill_urb(port->read_urb);
393} 393}
394 394
@@ -397,14 +397,14 @@ static void empeg_unthrottle (struct usb_serial_port *port)
397{ 397{
398 int result; 398 int result;
399 399
400 dbg("%s - port %d", __FUNCTION__, port->number); 400 dbg("%s - port %d", __func__, port->number);
401 401
402 port->read_urb->dev = port->serial->dev; 402 port->read_urb->dev = port->serial->dev;
403 403
404 result = usb_submit_urb(port->read_urb, GFP_ATOMIC); 404 result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
405 405
406 if (result) 406 if (result)
407 dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result); 407 dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __func__, result);
408 408
409 return; 409 return;
410} 410}
@@ -414,14 +414,14 @@ static int empeg_startup (struct usb_serial *serial)
414{ 414{
415 int r; 415 int r;
416 416
417 dbg("%s", __FUNCTION__); 417 dbg("%s", __func__);
418 418
419 if (serial->dev->actconfig->desc.bConfigurationValue != 1) { 419 if (serial->dev->actconfig->desc.bConfigurationValue != 1) {
420 err("active config #%d != 1 ??", 420 err("active config #%d != 1 ??",
421 serial->dev->actconfig->desc.bConfigurationValue); 421 serial->dev->actconfig->desc.bConfigurationValue);
422 return -ENODEV; 422 return -ENODEV;
423 } 423 }
424 dbg("%s - reset config", __FUNCTION__); 424 dbg("%s - reset config", __func__);
425 r = usb_reset_configuration (serial->dev); 425 r = usb_reset_configuration (serial->dev);
426 426
427 /* continue on with initialization */ 427 /* continue on with initialization */
@@ -432,13 +432,13 @@ static int empeg_startup (struct usb_serial *serial)
432 432
433static void empeg_shutdown (struct usb_serial *serial) 433static void empeg_shutdown (struct usb_serial *serial)
434{ 434{
435 dbg ("%s", __FUNCTION__); 435 dbg ("%s", __func__);
436} 436}
437 437
438 438
439static int empeg_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg) 439static int empeg_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg)
440{ 440{
441 dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd); 441 dbg("%s - port %d, cmd 0x%.4x", __func__, port->number, cmd);
442 442
443 return -ENOIOCTLCMD; 443 return -ENOIOCTLCMD;
444} 444}
@@ -447,7 +447,7 @@ static int empeg_ioctl (struct usb_serial_port *port, struct file * file, unsign
447static void empeg_set_termios (struct usb_serial_port *port, struct ktermios *old_termios) 447static void empeg_set_termios (struct usb_serial_port *port, struct ktermios *old_termios)
448{ 448{
449 struct ktermios *termios = port->tty->termios; 449 struct ktermios *termios = port->tty->termios;
450 dbg("%s - port %d", __FUNCTION__, port->number); 450 dbg("%s - port %d", __func__, port->number);
451 451
452 /* 452 /*
453 * The empeg-car player wants these particular tty settings. 453 * The empeg-car player wants these particular tty settings.
@@ -514,7 +514,7 @@ static int __init empeg_init (void)
514 urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL); 514 urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL);
515 if (!urb->transfer_buffer) { 515 if (!urb->transfer_buffer) {
516 err("%s - out of memory for urb buffers.", 516 err("%s - out of memory for urb buffers.",
517 __FUNCTION__); 517 __func__);
518 continue; 518 continue;
519 } 519 }
520 } 520 }