aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/iuu_phoenix.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/iuu_phoenix.c')
-rw-r--r--drivers/usb/serial/iuu_phoenix.c128
1 files changed, 64 insertions, 64 deletions
diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c
index 7fee53441c24..b486a54c6f46 100644
--- a/drivers/usb/serial/iuu_phoenix.c
+++ b/drivers/usb/serial/iuu_phoenix.c
@@ -98,10 +98,10 @@ static int iuu_alloc_buf(struct iuu_private *priv)
98 priv->writebuf = kzalloc(256, GFP_KERNEL); 98 priv->writebuf = kzalloc(256, GFP_KERNEL);
99 if (!priv->buf || !priv->dbgbuf || !priv->writebuf) { 99 if (!priv->buf || !priv->dbgbuf || !priv->writebuf) {
100 iuu_free_buf(priv); 100 iuu_free_buf(priv);
101 dbg("%s problem allocation buffer", __FUNCTION__); 101 dbg("%s problem allocation buffer", __func__);
102 return -ENOMEM; 102 return -ENOMEM;
103 } 103 }
104 dbg("%s - Privates buffers allocation success", __FUNCTION__); 104 dbg("%s - Privates buffers allocation success", __func__);
105 return 0; 105 return 0;
106} 106}
107 107
@@ -109,7 +109,7 @@ static int iuu_startup(struct usb_serial *serial)
109{ 109{
110 struct iuu_private *priv; 110 struct iuu_private *priv;
111 priv = kzalloc(sizeof(struct iuu_private), GFP_KERNEL); 111 priv = kzalloc(sizeof(struct iuu_private), GFP_KERNEL);
112 dbg("%s- priv allocation success", __FUNCTION__); 112 dbg("%s- priv allocation success", __func__);
113 if (!priv) 113 if (!priv)
114 return -ENOMEM; 114 return -ENOMEM;
115 if (iuu_alloc_buf(priv)) { 115 if (iuu_alloc_buf(priv)) {
@@ -130,17 +130,17 @@ static void iuu_shutdown(struct usb_serial *serial)
130 if (!port) 130 if (!port)
131 return; 131 return;
132 132
133 dbg("%s", __FUNCTION__); 133 dbg("%s", __func__);
134 134
135 if (priv) { 135 if (priv) {
136 iuu_free_buf(priv); 136 iuu_free_buf(priv);
137 dbg("%s - I will free all", __FUNCTION__); 137 dbg("%s - I will free all", __func__);
138 usb_set_serial_port_data(port, NULL); 138 usb_set_serial_port_data(port, NULL);
139 139
140 dbg("%s - priv is not anymore in port structure", __FUNCTION__); 140 dbg("%s - priv is not anymore in port structure", __func__);
141 kfree(priv); 141 kfree(priv);
142 142
143 dbg("%s priv is now kfree", __FUNCTION__); 143 dbg("%s priv is now kfree", __func__);
144 } 144 }
145} 145}
146 146
@@ -151,7 +151,7 @@ static int iuu_tiocmset(struct usb_serial_port *port, struct file *file,
151 unsigned long flags; 151 unsigned long flags;
152 152
153 /* FIXME: locking on tiomstatus */ 153 /* FIXME: locking on tiomstatus */
154 dbg("%s (%d) msg : SET = 0x%04x, CLEAR = 0x%04x ", __FUNCTION__, 154 dbg("%s (%d) msg : SET = 0x%04x, CLEAR = 0x%04x ", __func__,
155 port->number, set, clear); 155 port->number, set, clear);
156 156
157 spin_lock_irqsave(&priv->lock, flags); 157 spin_lock_irqsave(&priv->lock, flags);
@@ -159,7 +159,7 @@ static int iuu_tiocmset(struct usb_serial_port *port, struct file *file,
159 priv->tiostatus = TIOCM_RTS; 159 priv->tiostatus = TIOCM_RTS;
160 160
161 if (!(set & TIOCM_RTS) && priv->tiostatus == TIOCM_RTS) { 161 if (!(set & TIOCM_RTS) && priv->tiostatus == TIOCM_RTS) {
162 dbg("%s TIOCMSET RESET called !!!", __FUNCTION__); 162 dbg("%s TIOCMSET RESET called !!!", __func__);
163 priv->reset = 1; 163 priv->reset = 1;
164 } 164 }
165 spin_unlock_irqrestore(&priv->lock, flags); 165 spin_unlock_irqrestore(&priv->lock, flags);
@@ -188,10 +188,10 @@ static void iuu_rxcmd(struct urb *urb)
188{ 188{
189 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 189 struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
190 int result; 190 int result;
191 dbg("%s - enter", __FUNCTION__); 191 dbg("%s - enter", __func__);
192 192
193 if (urb->status) { 193 if (urb->status) {
194 dbg("%s - urb->status = %d", __FUNCTION__, urb->status); 194 dbg("%s - urb->status = %d", __func__, urb->status);
195 /* error stop all */ 195 /* error stop all */
196 return; 196 return;
197 } 197 }
@@ -211,7 +211,7 @@ static int iuu_reset(struct usb_serial_port *port, u8 wt)
211 struct iuu_private *priv = usb_get_serial_port_data(port); 211 struct iuu_private *priv = usb_get_serial_port_data(port);
212 int result; 212 int result;
213 char *buf_ptr = port->write_urb->transfer_buffer; 213 char *buf_ptr = port->write_urb->transfer_buffer;
214 dbg("%s - enter", __FUNCTION__); 214 dbg("%s - enter", __func__);
215 215
216 /* Prepare the reset sequence */ 216 /* Prepare the reset sequence */
217 217
@@ -243,16 +243,16 @@ static void iuu_update_status_callback(struct urb *urb)
243 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 243 struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
244 struct iuu_private *priv = usb_get_serial_port_data(port); 244 struct iuu_private *priv = usb_get_serial_port_data(port);
245 u8 *st; 245 u8 *st;
246 dbg("%s - enter", __FUNCTION__); 246 dbg("%s - enter", __func__);
247 247
248 if (urb->status) { 248 if (urb->status) {
249 dbg("%s - urb->status = %d", __FUNCTION__, urb->status); 249 dbg("%s - urb->status = %d", __func__, urb->status);
250 /* error stop all */ 250 /* error stop all */
251 return; 251 return;
252 } 252 }
253 253
254 st = urb->transfer_buffer; 254 st = urb->transfer_buffer;
255 dbg("%s - enter", __FUNCTION__); 255 dbg("%s - enter", __func__);
256 if (urb->actual_length == 1) { 256 if (urb->actual_length == 1) {
257 switch (st[0]) { 257 switch (st[0]) {
258 case 0x1: 258 case 0x1:
@@ -272,9 +272,9 @@ static void iuu_status_callback(struct urb *urb)
272{ 272{
273 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 273 struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
274 int result; 274 int result;
275 dbg("%s - enter", __FUNCTION__); 275 dbg("%s - enter", __func__);
276 276
277 dbg("%s - urb->status = %d", __FUNCTION__, urb->status); 277 dbg("%s - urb->status = %d", __func__, urb->status);
278 usb_fill_bulk_urb(port->read_urb, port->serial->dev, 278 usb_fill_bulk_urb(port->read_urb, port->serial->dev,
279 usb_rcvbulkpipe(port->serial->dev, 279 usb_rcvbulkpipe(port->serial->dev,
280 port->bulk_in_endpointAddress), 280 port->bulk_in_endpointAddress),
@@ -287,7 +287,7 @@ static int iuu_status(struct usb_serial_port *port)
287{ 287{
288 int result; 288 int result;
289 289
290 dbg("%s - enter", __FUNCTION__); 290 dbg("%s - enter", __func__);
291 291
292 memset(port->write_urb->transfer_buffer, IUU_GET_STATE_REGISTER, 1); 292 memset(port->write_urb->transfer_buffer, IUU_GET_STATE_REGISTER, 1);
293 usb_fill_bulk_urb(port->write_urb, port->serial->dev, 293 usb_fill_bulk_urb(port->write_urb, port->serial->dev,
@@ -306,7 +306,7 @@ static int bulk_immediate(struct usb_serial_port *port, u8 *buf, u8 count)
306 struct usb_serial *serial = port->serial; 306 struct usb_serial *serial = port->serial;
307 int actual = 0; 307 int actual = 0;
308 308
309 dbg("%s - enter", __FUNCTION__); 309 dbg("%s - enter", __func__);
310 310
311 /* send the data out the bulk port */ 311 /* send the data out the bulk port */
312 312
@@ -317,9 +317,9 @@ static int bulk_immediate(struct usb_serial_port *port, u8 *buf, u8 count)
317 count, &actual, HZ * 1); 317 count, &actual, HZ * 1);
318 318
319 if (status != IUU_OPERATION_OK) { 319 if (status != IUU_OPERATION_OK) {
320 dbg("%s - error = %2x", __FUNCTION__, status); 320 dbg("%s - error = %2x", __func__, status);
321 } else { 321 } else {
322 dbg("%s - write OK !", __FUNCTION__); 322 dbg("%s - write OK !", __func__);
323 } 323 }
324 return status; 324 return status;
325} 325}
@@ -330,7 +330,7 @@ static int read_immediate(struct usb_serial_port *port, u8 *buf, u8 count)
330 struct usb_serial *serial = port->serial; 330 struct usb_serial *serial = port->serial;
331 int actual = 0; 331 int actual = 0;
332 332
333 dbg("%s - enter", __FUNCTION__); 333 dbg("%s - enter", __func__);
334 334
335 /* send the data out the bulk port */ 335 /* send the data out the bulk port */
336 336
@@ -341,9 +341,9 @@ static int read_immediate(struct usb_serial_port *port, u8 *buf, u8 count)
341 count, &actual, HZ * 1); 341 count, &actual, HZ * 1);
342 342
343 if (status != IUU_OPERATION_OK) { 343 if (status != IUU_OPERATION_OK) {
344 dbg("%s - error = %2x", __FUNCTION__, status); 344 dbg("%s - error = %2x", __func__, status);
345 } else { 345 } else {
346 dbg("%s - read OK !", __FUNCTION__); 346 dbg("%s - read OK !", __func__);
347 } 347 }
348 348
349 return status; 349 return status;
@@ -358,7 +358,7 @@ static int iuu_led(struct usb_serial_port *port, unsigned int R,
358 if (!buf) 358 if (!buf)
359 return -ENOMEM; 359 return -ENOMEM;
360 360
361 dbg("%s - enter", __FUNCTION__); 361 dbg("%s - enter", __func__);
362 362
363 buf[0] = IUU_SET_LED; 363 buf[0] = IUU_SET_LED;
364 buf[1] = R & 0xFF; 364 buf[1] = R & 0xFF;
@@ -371,9 +371,9 @@ static int iuu_led(struct usb_serial_port *port, unsigned int R,
371 status = bulk_immediate(port, buf, 8); 371 status = bulk_immediate(port, buf, 8);
372 kfree(buf); 372 kfree(buf);
373 if (status != IUU_OPERATION_OK) 373 if (status != IUU_OPERATION_OK)
374 dbg("%s - led error status = %2x", __FUNCTION__, status); 374 dbg("%s - led error status = %2x", __func__, status);
375 else 375 else
376 dbg("%s - led OK !", __FUNCTION__); 376 dbg("%s - led OK !", __func__);
377 return IUU_OPERATION_OK; 377 return IUU_OPERATION_OK;
378} 378}
379 379
@@ -451,7 +451,7 @@ static int iuu_clk(struct usb_serial_port *port, int dwFrq)
451 unsigned int P2 = 0; 451 unsigned int P2 = 0;
452 int frq = (int)dwFrq; 452 int frq = (int)dwFrq;
453 453
454 dbg("%s - enter", __FUNCTION__); 454 dbg("%s - enter", __func__);
455 455
456 if (frq == 0) { 456 if (frq == 0) {
457 priv->buf[Count++] = IUU_UART_WRITE_I2C; 457 priv->buf[Count++] = IUU_UART_WRITE_I2C;
@@ -461,7 +461,7 @@ static int iuu_clk(struct usb_serial_port *port, int dwFrq)
461 461
462 status = bulk_immediate(port, (u8 *) priv->buf, Count); 462 status = bulk_immediate(port, (u8 *) priv->buf, Count);
463 if (status != 0) { 463 if (status != 0) {
464 dbg("%s - write error ", __FUNCTION__); 464 dbg("%s - write error ", __func__);
465 return status; 465 return status;
466 } 466 }
467 } else if (frq == 3579000) { 467 } else if (frq == 3579000) {
@@ -570,7 +570,7 @@ static int iuu_clk(struct usb_serial_port *port, int dwFrq)
570 570
571 status = bulk_immediate(port, (u8 *) priv->buf, Count); 571 status = bulk_immediate(port, (u8 *) priv->buf, Count);
572 if (status != IUU_OPERATION_OK) 572 if (status != IUU_OPERATION_OK)
573 dbg("%s - write error ", __FUNCTION__); 573 dbg("%s - write error ", __func__);
574 return status; 574 return status;
575} 575}
576 576
@@ -581,7 +581,7 @@ static int iuu_uart_flush(struct usb_serial_port *port)
581 u8 rxcmd = IUU_UART_RX; 581 u8 rxcmd = IUU_UART_RX;
582 struct iuu_private *priv = usb_get_serial_port_data(port); 582 struct iuu_private *priv = usb_get_serial_port_data(port);
583 583
584 dbg("%s - enter", __FUNCTION__); 584 dbg("%s - enter", __func__);
585 585
586 if (iuu_led(port, 0xF000, 0, 0, 0xFF) < 0) 586 if (iuu_led(port, 0xF000, 0, 0, 0xFF) < 0)
587 return -EIO; 587 return -EIO;
@@ -589,27 +589,27 @@ static int iuu_uart_flush(struct usb_serial_port *port)
589 for (i = 0; i < 2; i++) { 589 for (i = 0; i < 2; i++) {
590 status = bulk_immediate(port, &rxcmd, 1); 590 status = bulk_immediate(port, &rxcmd, 1);
591 if (status != IUU_OPERATION_OK) { 591 if (status != IUU_OPERATION_OK) {
592 dbg("%s - uart_flush_write error", __FUNCTION__); 592 dbg("%s - uart_flush_write error", __func__);
593 return status; 593 return status;
594 } 594 }
595 595
596 status = read_immediate(port, &priv->len, 1); 596 status = read_immediate(port, &priv->len, 1);
597 if (status != IUU_OPERATION_OK) { 597 if (status != IUU_OPERATION_OK) {
598 dbg("%s - uart_flush_read error", __FUNCTION__); 598 dbg("%s - uart_flush_read error", __func__);
599 return status; 599 return status;
600 } 600 }
601 601
602 if (priv->len > 0) { 602 if (priv->len > 0) {
603 dbg("%s - uart_flush datalen is : %i ", __FUNCTION__, 603 dbg("%s - uart_flush datalen is : %i ", __func__,
604 priv->len); 604 priv->len);
605 status = read_immediate(port, priv->buf, priv->len); 605 status = read_immediate(port, priv->buf, priv->len);
606 if (status != IUU_OPERATION_OK) { 606 if (status != IUU_OPERATION_OK) {
607 dbg("%s - uart_flush_read error", __FUNCTION__); 607 dbg("%s - uart_flush_read error", __func__);
608 return status; 608 return status;
609 } 609 }
610 } 610 }
611 } 611 }
612 dbg("%s - uart_flush_read OK!", __FUNCTION__); 612 dbg("%s - uart_flush_read OK!", __func__);
613 iuu_led(port, 0, 0xF000, 0, 0xFF); 613 iuu_led(port, 0, 0xF000, 0, 0xFF);
614 return status; 614 return status;
615} 615}
@@ -619,20 +619,20 @@ static void read_buf_callback(struct urb *urb)
619 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 619 struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
620 unsigned char *data = urb->transfer_buffer; 620 unsigned char *data = urb->transfer_buffer;
621 struct tty_struct *tty; 621 struct tty_struct *tty;
622 dbg("%s - urb->status = %d", __FUNCTION__, urb->status); 622 dbg("%s - urb->status = %d", __func__, urb->status);
623 623
624 if (urb->status) { 624 if (urb->status) {
625 dbg("%s - urb->status = %d", __FUNCTION__, urb->status); 625 dbg("%s - urb->status = %d", __func__, urb->status);
626 if (urb->status == -EPROTO) { 626 if (urb->status == -EPROTO) {
627 /* reschedule needed */ 627 /* reschedule needed */
628 } 628 }
629 return; 629 return;
630 } 630 }
631 631
632 dbg("%s - %i chars to write", __FUNCTION__, urb->actual_length); 632 dbg("%s - %i chars to write", __func__, urb->actual_length);
633 tty = port->tty; 633 tty = port->tty;
634 if (data == NULL) 634 if (data == NULL)
635 dbg("%s - data is NULL !!!", __FUNCTION__); 635 dbg("%s - data is NULL !!!", __func__);
636 if (tty && urb->actual_length && data) { 636 if (tty && urb->actual_length && data) {
637 tty_insert_flip_string(tty, data, urb->actual_length); 637 tty_insert_flip_string(tty, data, urb->actual_length);
638 tty_flip_buffer_push(tty); 638 tty_flip_buffer_push(tty);
@@ -647,7 +647,7 @@ static int iuu_bulk_write(struct usb_serial_port *port)
647 int result; 647 int result;
648 int i; 648 int i;
649 char *buf_ptr = port->write_urb->transfer_buffer; 649 char *buf_ptr = port->write_urb->transfer_buffer;
650 dbg("%s - enter", __FUNCTION__); 650 dbg("%s - enter", __func__);
651 651
652 *buf_ptr++ = IUU_UART_ESC; 652 *buf_ptr++ = IUU_UART_ESC;
653 *buf_ptr++ = IUU_UART_TX; 653 *buf_ptr++ = IUU_UART_TX;
@@ -660,7 +660,7 @@ static int iuu_bulk_write(struct usb_serial_port *port)
660 sprintf(priv->dbgbuf + i*2 , 660 sprintf(priv->dbgbuf + i*2 ,
661 "%02X", priv->writebuf[i]); 661 "%02X", priv->writebuf[i]);
662 priv->dbgbuf[priv->writelen+i*2] = 0; 662 priv->dbgbuf[priv->writelen+i*2] = 0;
663 dbg("%s - writing %i chars : %s", __FUNCTION__, 663 dbg("%s - writing %i chars : %s", __func__,
664 priv->writelen, priv->dbgbuf); 664 priv->writelen, priv->dbgbuf);
665 } 665 }
666 usb_fill_bulk_urb(port->write_urb, port->serial->dev, 666 usb_fill_bulk_urb(port->write_urb, port->serial->dev,
@@ -679,7 +679,7 @@ static int iuu_bulk_write(struct usb_serial_port *port)
679static int iuu_read_buf(struct usb_serial_port *port, int len) 679static int iuu_read_buf(struct usb_serial_port *port, int len)
680{ 680{
681 int result; 681 int result;
682 dbg("%s - enter", __FUNCTION__); 682 dbg("%s - enter", __func__);
683 683
684 usb_fill_bulk_urb(port->read_urb, port->serial->dev, 684 usb_fill_bulk_urb(port->read_urb, port->serial->dev,
685 usb_rcvbulkpipe(port->serial->dev, 685 usb_rcvbulkpipe(port->serial->dev,
@@ -701,21 +701,21 @@ static void iuu_uart_read_callback(struct urb *urb)
701 unsigned char *data = urb->transfer_buffer; 701 unsigned char *data = urb->transfer_buffer;
702 priv->poll++; 702 priv->poll++;
703 703
704 dbg("%s - enter", __FUNCTION__); 704 dbg("%s - enter", __func__);
705 705
706 if (urb->status) { 706 if (urb->status) {
707 dbg("%s - urb->status = %d", __FUNCTION__, urb->status); 707 dbg("%s - urb->status = %d", __func__, urb->status);
708 /* error stop all */ 708 /* error stop all */
709 return; 709 return;
710 } 710 }
711 if (data == NULL) 711 if (data == NULL)
712 dbg("%s - data is NULL !!!", __FUNCTION__); 712 dbg("%s - data is NULL !!!", __func__);
713 713
714 if (urb->actual_length == 1 && data != NULL) 714 if (urb->actual_length == 1 && data != NULL)
715 len = (int) data[0]; 715 len = (int) data[0];
716 716
717 if (urb->actual_length > 1) { 717 if (urb->actual_length > 1) {
718 dbg("%s - urb->actual_length = %i", __FUNCTION__, 718 dbg("%s - urb->actual_length = %i", __func__,
719 urb->actual_length); 719 urb->actual_length);
720 error = 1; 720 error = 1;
721 return; 721 return;
@@ -724,7 +724,7 @@ static void iuu_uart_read_callback(struct urb *urb)
724 724
725 if (len > 0 && error == 0) { 725 if (len > 0 && error == 0) {
726 dbg("%s - call read buf - len to read is %i ", 726 dbg("%s - call read buf - len to read is %i ",
727 __FUNCTION__, len); 727 __func__, len);
728 status = iuu_read_buf(port, len); 728 status = iuu_read_buf(port, len);
729 return; 729 return;
730 } 730 }
@@ -750,7 +750,7 @@ static void iuu_uart_read_callback(struct urb *urb)
750 } 750 }
751 spin_unlock_irqrestore(&priv->lock, flags); 751 spin_unlock_irqrestore(&priv->lock, flags);
752 /* if nothing to write call again rxcmd */ 752 /* if nothing to write call again rxcmd */
753 dbg("%s - rxcmd recall", __FUNCTION__); 753 dbg("%s - rxcmd recall", __func__);
754 iuu_led_activity_off(urb); 754 iuu_led_activity_off(urb);
755 return; 755 return;
756} 756}
@@ -760,7 +760,7 @@ static int iuu_uart_write(struct usb_serial_port *port, const u8 *buf,
760{ 760{
761 struct iuu_private *priv = usb_get_serial_port_data(port); 761 struct iuu_private *priv = usb_get_serial_port_data(port);
762 unsigned int flags; 762 unsigned int flags;
763 dbg("%s - enter", __FUNCTION__); 763 dbg("%s - enter", __func__);
764 764
765 if (count > 256) 765 if (count > 256)
766 return -ENOMEM; 766 return -ENOMEM;
@@ -783,12 +783,12 @@ static void read_rxcmd_callback(struct urb *urb)
783{ 783{
784 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 784 struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
785 int result; 785 int result;
786 dbg("%s - enter", __FUNCTION__); 786 dbg("%s - enter", __func__);
787 787
788 dbg("%s - urb->status = %d", __FUNCTION__, urb->status); 788 dbg("%s - urb->status = %d", __func__, urb->status);
789 789
790 if (urb->status) { 790 if (urb->status) {
791 dbg("%s - urb->status = %d", __FUNCTION__, urb->status); 791 dbg("%s - urb->status = %d", __func__, urb->status);
792 /* error stop all */ 792 /* error stop all */
793 return; 793 return;
794 } 794 }
@@ -799,7 +799,7 @@ static void read_rxcmd_callback(struct urb *urb)
799 port->read_urb->transfer_buffer, 256, 799 port->read_urb->transfer_buffer, 256,
800 iuu_uart_read_callback, port); 800 iuu_uart_read_callback, port);
801 result = usb_submit_urb(port->read_urb, GFP_ATOMIC); 801 result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
802 dbg("%s - submit result = %d", __FUNCTION__, result); 802 dbg("%s - submit result = %d", __func__, result);
803 return; 803 return;
804} 804}
805 805
@@ -820,13 +820,13 @@ static int iuu_uart_on(struct usb_serial_port *port)
820 820
821 status = bulk_immediate(port, buf, 4); 821 status = bulk_immediate(port, buf, 4);
822 if (status != IUU_OPERATION_OK) { 822 if (status != IUU_OPERATION_OK) {
823 dbg("%s - uart_on error", __FUNCTION__); 823 dbg("%s - uart_on error", __func__);
824 goto uart_enable_failed; 824 goto uart_enable_failed;
825 } 825 }
826 /* iuu_reset() the card after iuu_uart_on() */ 826 /* iuu_reset() the card after iuu_uart_on() */
827 status = iuu_uart_flush(port); 827 status = iuu_uart_flush(port);
828 if (status != IUU_OPERATION_OK) 828 if (status != IUU_OPERATION_OK)
829 dbg("%s - uart_flush error", __FUNCTION__); 829 dbg("%s - uart_flush error", __func__);
830uart_enable_failed: 830uart_enable_failed:
831 kfree(buf); 831 kfree(buf);
832 return status; 832 return status;
@@ -844,7 +844,7 @@ static int iuu_uart_off(struct usb_serial_port *port)
844 844
845 status = bulk_immediate(port, buf, 1); 845 status = bulk_immediate(port, buf, 1);
846 if (status != IUU_OPERATION_OK) 846 if (status != IUU_OPERATION_OK)
847 dbg("%s - uart_off error", __FUNCTION__); 847 dbg("%s - uart_off error", __func__);
848 848
849 kfree(buf); 849 kfree(buf);
850 return status; 850 return status;
@@ -938,7 +938,7 @@ static int iuu_uart_baud(struct usb_serial_port *port, u32 baud,
938 938
939 status = bulk_immediate(port, dataout, DataCount); 939 status = bulk_immediate(port, dataout, DataCount);
940 if (status != IUU_OPERATION_OK) 940 if (status != IUU_OPERATION_OK)
941 dbg("%s - uart_off error", __FUNCTION__); 941 dbg("%s - uart_off error", __func__);
942 kfree(dataout); 942 kfree(dataout);
943 return status; 943 return status;
944} 944}
@@ -960,7 +960,7 @@ static void iuu_close(struct usb_serial_port *port, struct file *filp)
960 if (!serial) 960 if (!serial)
961 return; 961 return;
962 962
963 dbg("%s - port %d", __FUNCTION__, port->number); 963 dbg("%s - port %d", __func__, port->number);
964 964
965 iuu_uart_off(port); 965 iuu_uart_off(port);
966 if (serial->dev) { 966 if (serial->dev) {
@@ -977,7 +977,7 @@ static void iuu_close(struct usb_serial_port *port, struct file *filp)
977 } 977 }
978 /* free writebuf */ 978 /* free writebuf */
979 /* shutdown our urbs */ 979 /* shutdown our urbs */
980 dbg("%s - shutting down urbs", __FUNCTION__); 980 dbg("%s - shutting down urbs", __func__);
981 usb_kill_urb(port->write_urb); 981 usb_kill_urb(port->write_urb);
982 usb_kill_urb(port->read_urb); 982 usb_kill_urb(port->read_urb);
983 usb_kill_urb(port->interrupt_in_urb); 983 usb_kill_urb(port->interrupt_in_urb);
@@ -998,7 +998,7 @@ static int iuu_open(struct usb_serial_port *port, struct file *filp)
998 unsigned long flags; 998 unsigned long flags;
999 struct iuu_private *priv = usb_get_serial_port_data(port); 999 struct iuu_private *priv = usb_get_serial_port_data(port);
1000 1000
1001 dbg("%s - port %d", __FUNCTION__, port->number); 1001 dbg("%s - port %d", __func__, port->number);
1002 usb_clear_halt(serial->dev, port->write_urb->pipe); 1002 usb_clear_halt(serial->dev, port->write_urb->pipe);
1003 usb_clear_halt(serial->dev, port->read_urb->pipe); 1003 usb_clear_halt(serial->dev, port->read_urb->pipe);
1004 1004
@@ -1135,7 +1135,7 @@ static int iuu_open(struct usb_serial_port *port, struct file *filp)
1135 1135
1136 iuu_uart_flush(port); 1136 iuu_uart_flush(port);
1137 1137
1138 dbg("%s - initialization done", __FUNCTION__); 1138 dbg("%s - initialization done", __func__);
1139 1139
1140 memset(port->write_urb->transfer_buffer, IUU_UART_RX, 1); 1140 memset(port->write_urb->transfer_buffer, IUU_UART_RX, 1);
1141 usb_fill_bulk_urb(port->write_urb, port->serial->dev, 1141 usb_fill_bulk_urb(port->write_urb, port->serial->dev,
@@ -1147,11 +1147,11 @@ static int iuu_open(struct usb_serial_port *port, struct file *filp)
1147 1147
1148 if (result) { 1148 if (result) {
1149 dev_err(&port->dev, "%s - failed submitting read urb," 1149 dev_err(&port->dev, "%s - failed submitting read urb,"
1150 " error %d\n", __FUNCTION__, result); 1150 " error %d\n", __func__, result);
1151 iuu_close(port, NULL); 1151 iuu_close(port, NULL);
1152 return -EPROTO; 1152 return -EPROTO;
1153 } else { 1153 } else {
1154 dbg("%s - rxcmd OK", __FUNCTION__); 1154 dbg("%s - rxcmd OK", __func__);
1155 } 1155 }
1156 return result; 1156 return result;
1157} 1157}