aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/hvsi.c
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-04-30 03:55:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-30 11:29:54 -0400
commitbf9d89295233ae2ba7b312c78ee5657307b09f4c (patch)
tree3da2fbcd93937bfa1907a893dc0d418c78f3d37b /drivers/char/hvsi.c
parent8e24eea728068bbeb6a3c500b848f883a20bf225 (diff)
drivers/char: replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/hvsi.c')
-rw-r--r--drivers/char/hvsi.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/drivers/char/hvsi.c b/drivers/char/hvsi.c
index d5a752da322f..59c6f9ab94e4 100644
--- a/drivers/char/hvsi.c
+++ b/drivers/char/hvsi.c
@@ -246,7 +246,7 @@ static void compact_inbuf(struct hvsi_struct *hp, uint8_t *read_to)
246{ 246{
247 int remaining = (int)(hp->inbuf_end - read_to); 247 int remaining = (int)(hp->inbuf_end - read_to);
248 248
249 pr_debug("%s: %i chars remain\n", __FUNCTION__, remaining); 249 pr_debug("%s: %i chars remain\n", __func__, remaining);
250 250
251 if (read_to != hp->inbuf) 251 if (read_to != hp->inbuf)
252 memmove(hp->inbuf, read_to, remaining); 252 memmove(hp->inbuf, read_to, remaining);
@@ -365,7 +365,7 @@ static int hvsi_version_respond(struct hvsi_struct *hp, uint16_t query_seqno)
365 packet.u.version = HVSI_VERSION; 365 packet.u.version = HVSI_VERSION;
366 packet.query_seqno = query_seqno+1; 366 packet.query_seqno = query_seqno+1;
367 367
368 pr_debug("%s: sending %i bytes\n", __FUNCTION__, packet.len); 368 pr_debug("%s: sending %i bytes\n", __func__, packet.len);
369 dbg_dump_hex((uint8_t*)&packet, packet.len); 369 dbg_dump_hex((uint8_t*)&packet, packet.len);
370 370
371 wrote = hvc_put_chars(hp->vtermno, (char *)&packet, packet.len); 371 wrote = hvc_put_chars(hp->vtermno, (char *)&packet, packet.len);
@@ -437,7 +437,7 @@ static struct tty_struct *hvsi_recv_data(struct hvsi_struct *hp,
437 return NULL; 437 return NULL;
438 438
439 if (overflow > 0) { 439 if (overflow > 0) {
440 pr_debug("%s: got >TTY_THRESHOLD_THROTTLE bytes\n", __FUNCTION__); 440 pr_debug("%s: got >TTY_THRESHOLD_THROTTLE bytes\n", __func__);
441 datalen = TTY_THRESHOLD_THROTTLE; 441 datalen = TTY_THRESHOLD_THROTTLE;
442 } 442 }
443 443
@@ -448,7 +448,7 @@ static struct tty_struct *hvsi_recv_data(struct hvsi_struct *hp,
448 * we still have more data to deliver, so we need to save off the 448 * we still have more data to deliver, so we need to save off the
449 * overflow and send it later 449 * overflow and send it later
450 */ 450 */
451 pr_debug("%s: deferring overflow\n", __FUNCTION__); 451 pr_debug("%s: deferring overflow\n", __func__);
452 memcpy(hp->throttle_buf, data + TTY_THRESHOLD_THROTTLE, overflow); 452 memcpy(hp->throttle_buf, data + TTY_THRESHOLD_THROTTLE, overflow);
453 hp->n_throttle = overflow; 453 hp->n_throttle = overflow;
454 } 454 }
@@ -474,11 +474,11 @@ static int hvsi_load_chunk(struct hvsi_struct *hp, struct tty_struct **flip,
474 474
475 chunklen = hvsi_read(hp, hp->inbuf_end, HVSI_MAX_READ); 475 chunklen = hvsi_read(hp, hp->inbuf_end, HVSI_MAX_READ);
476 if (chunklen == 0) { 476 if (chunklen == 0) {
477 pr_debug("%s: 0-length read\n", __FUNCTION__); 477 pr_debug("%s: 0-length read\n", __func__);
478 return 0; 478 return 0;
479 } 479 }
480 480
481 pr_debug("%s: got %i bytes\n", __FUNCTION__, chunklen); 481 pr_debug("%s: got %i bytes\n", __func__, chunklen);
482 dbg_dump_hex(hp->inbuf_end, chunklen); 482 dbg_dump_hex(hp->inbuf_end, chunklen);
483 483
484 hp->inbuf_end += chunklen; 484 hp->inbuf_end += chunklen;
@@ -495,7 +495,7 @@ static int hvsi_load_chunk(struct hvsi_struct *hp, struct tty_struct **flip,
495 continue; 495 continue;
496 } 496 }
497 497
498 pr_debug("%s: handling %i-byte packet\n", __FUNCTION__, 498 pr_debug("%s: handling %i-byte packet\n", __func__,
499 len_packet(packet)); 499 len_packet(packet));
500 dbg_dump_packet(packet); 500 dbg_dump_packet(packet);
501 501
@@ -526,7 +526,7 @@ static int hvsi_load_chunk(struct hvsi_struct *hp, struct tty_struct **flip,
526 packet += len_packet(packet); 526 packet += len_packet(packet);
527 527
528 if (*hangup || *handshake) { 528 if (*hangup || *handshake) {
529 pr_debug("%s: hangup or handshake\n", __FUNCTION__); 529 pr_debug("%s: hangup or handshake\n", __func__);
530 /* 530 /*
531 * we need to send the hangup now before receiving any more data. 531 * we need to send the hangup now before receiving any more data.
532 * If we get "data, hangup, data", we can't deliver the second 532 * If we get "data, hangup, data", we can't deliver the second
@@ -543,7 +543,7 @@ static int hvsi_load_chunk(struct hvsi_struct *hp, struct tty_struct **flip,
543 543
544static void hvsi_send_overflow(struct hvsi_struct *hp) 544static void hvsi_send_overflow(struct hvsi_struct *hp)
545{ 545{
546 pr_debug("%s: delivering %i bytes overflow\n", __FUNCTION__, 546 pr_debug("%s: delivering %i bytes overflow\n", __func__,
547 hp->n_throttle); 547 hp->n_throttle);
548 548
549 hvsi_insert_chars(hp, hp->throttle_buf, hp->n_throttle); 549 hvsi_insert_chars(hp, hp->throttle_buf, hp->n_throttle);
@@ -563,7 +563,7 @@ static irqreturn_t hvsi_interrupt(int irq, void *arg)
563 unsigned long flags; 563 unsigned long flags;
564 int again = 1; 564 int again = 1;
565 565
566 pr_debug("%s\n", __FUNCTION__); 566 pr_debug("%s\n", __func__);
567 567
568 while (again) { 568 while (again) {
569 spin_lock_irqsave(&hp->lock, flags); 569 spin_lock_irqsave(&hp->lock, flags);
@@ -647,7 +647,7 @@ static int hvsi_query(struct hvsi_struct *hp, uint16_t verb)
647 packet.seqno = atomic_inc_return(&hp->seqno); 647 packet.seqno = atomic_inc_return(&hp->seqno);
648 packet.verb = verb; 648 packet.verb = verb;
649 649
650 pr_debug("%s: sending %i bytes\n", __FUNCTION__, packet.len); 650 pr_debug("%s: sending %i bytes\n", __func__, packet.len);
651 dbg_dump_hex((uint8_t*)&packet, packet.len); 651 dbg_dump_hex((uint8_t*)&packet, packet.len);
652 652
653 wrote = hvc_put_chars(hp->vtermno, (char *)&packet, packet.len); 653 wrote = hvc_put_chars(hp->vtermno, (char *)&packet, packet.len);
@@ -674,7 +674,7 @@ static int hvsi_get_mctrl(struct hvsi_struct *hp)
674 return ret; 674 return ret;
675 } 675 }
676 676
677 pr_debug("%s: mctrl 0x%x\n", __FUNCTION__, hp->mctrl); 677 pr_debug("%s: mctrl 0x%x\n", __func__, hp->mctrl);
678 678
679 return 0; 679 return 0;
680} 680}
@@ -694,7 +694,7 @@ static int hvsi_set_mctrl(struct hvsi_struct *hp, uint16_t mctrl)
694 if (mctrl & TIOCM_DTR) 694 if (mctrl & TIOCM_DTR)
695 packet.word = HVSI_TSDTR; 695 packet.word = HVSI_TSDTR;
696 696
697 pr_debug("%s: sending %i bytes\n", __FUNCTION__, packet.len); 697 pr_debug("%s: sending %i bytes\n", __func__, packet.len);
698 dbg_dump_hex((uint8_t*)&packet, packet.len); 698 dbg_dump_hex((uint8_t*)&packet, packet.len);
699 699
700 wrote = hvc_put_chars(hp->vtermno, (char *)&packet, packet.len); 700 wrote = hvc_put_chars(hp->vtermno, (char *)&packet, packet.len);
@@ -790,7 +790,7 @@ static void hvsi_close_protocol(struct hvsi_struct *hp)
790 packet.len = 6; 790 packet.len = 6;
791 packet.verb = VSV_CLOSE_PROTOCOL; 791 packet.verb = VSV_CLOSE_PROTOCOL;
792 792
793 pr_debug("%s: sending %i bytes\n", __FUNCTION__, packet.len); 793 pr_debug("%s: sending %i bytes\n", __func__, packet.len);
794 dbg_dump_hex((uint8_t*)&packet, packet.len); 794 dbg_dump_hex((uint8_t*)&packet, packet.len);
795 795
796 hvc_put_chars(hp->vtermno, (char *)&packet, packet.len); 796 hvc_put_chars(hp->vtermno, (char *)&packet, packet.len);
@@ -803,7 +803,7 @@ static int hvsi_open(struct tty_struct *tty, struct file *filp)
803 int line = tty->index; 803 int line = tty->index;
804 int ret; 804 int ret;
805 805
806 pr_debug("%s\n", __FUNCTION__); 806 pr_debug("%s\n", __func__);
807 807
808 if (line < 0 || line >= hvsi_count) 808 if (line < 0 || line >= hvsi_count)
809 return -ENODEV; 809 return -ENODEV;
@@ -868,7 +868,7 @@ static void hvsi_close(struct tty_struct *tty, struct file *filp)
868 struct hvsi_struct *hp = tty->driver_data; 868 struct hvsi_struct *hp = tty->driver_data;
869 unsigned long flags; 869 unsigned long flags;
870 870
871 pr_debug("%s\n", __FUNCTION__); 871 pr_debug("%s\n", __func__);
872 872
873 if (tty_hung_up_p(filp)) 873 if (tty_hung_up_p(filp))
874 return; 874 return;
@@ -920,7 +920,7 @@ static void hvsi_hangup(struct tty_struct *tty)
920 struct hvsi_struct *hp = tty->driver_data; 920 struct hvsi_struct *hp = tty->driver_data;
921 unsigned long flags; 921 unsigned long flags;
922 922
923 pr_debug("%s\n", __FUNCTION__); 923 pr_debug("%s\n", __func__);
924 924
925 spin_lock_irqsave(&hp->lock, flags); 925 spin_lock_irqsave(&hp->lock, flags);
926 926
@@ -942,7 +942,7 @@ static void hvsi_push(struct hvsi_struct *hp)
942 n = hvsi_put_chars(hp, hp->outbuf, hp->n_outbuf); 942 n = hvsi_put_chars(hp, hp->outbuf, hp->n_outbuf);
943 if (n > 0) { 943 if (n > 0) {
944 /* success */ 944 /* success */
945 pr_debug("%s: wrote %i chars\n", __FUNCTION__, n); 945 pr_debug("%s: wrote %i chars\n", __func__, n);
946 hp->n_outbuf = 0; 946 hp->n_outbuf = 0;
947 } else if (n == -EIO) { 947 } else if (n == -EIO) {
948 __set_state(hp, HVSI_FSP_DIED); 948 __set_state(hp, HVSI_FSP_DIED);
@@ -965,7 +965,7 @@ static void hvsi_write_worker(struct work_struct *work)
965 965
966 spin_lock_irqsave(&hp->lock, flags); 966 spin_lock_irqsave(&hp->lock, flags);
967 967
968 pr_debug("%s: %i chars in buffer\n", __FUNCTION__, hp->n_outbuf); 968 pr_debug("%s: %i chars in buffer\n", __func__, hp->n_outbuf);
969 969
970 if (!is_open(hp)) { 970 if (!is_open(hp)) {
971 /* 971 /*
@@ -983,7 +983,7 @@ static void hvsi_write_worker(struct work_struct *work)
983 schedule_delayed_work(&hp->writer, 10); 983 schedule_delayed_work(&hp->writer, 10);
984 else { 984 else {
985#ifdef DEBUG 985#ifdef DEBUG
986 pr_debug("%s: outbuf emptied after %li jiffies\n", __FUNCTION__, 986 pr_debug("%s: outbuf emptied after %li jiffies\n", __func__,
987 jiffies - start_j); 987 jiffies - start_j);
988 start_j = 0; 988 start_j = 0;
989#endif /* DEBUG */ 989#endif /* DEBUG */
@@ -1020,11 +1020,11 @@ static int hvsi_write(struct tty_struct *tty,
1020 1020
1021 spin_lock_irqsave(&hp->lock, flags); 1021 spin_lock_irqsave(&hp->lock, flags);
1022 1022
1023 pr_debug("%s: %i chars in buffer\n", __FUNCTION__, hp->n_outbuf); 1023 pr_debug("%s: %i chars in buffer\n", __func__, hp->n_outbuf);
1024 1024
1025 if (!is_open(hp)) { 1025 if (!is_open(hp)) {
1026 /* we're either closing or not yet open; don't accept data */ 1026 /* we're either closing or not yet open; don't accept data */
1027 pr_debug("%s: not open\n", __FUNCTION__); 1027 pr_debug("%s: not open\n", __func__);
1028 goto out; 1028 goto out;
1029 } 1029 }
1030 1030
@@ -1058,7 +1058,7 @@ out:
1058 spin_unlock_irqrestore(&hp->lock, flags); 1058 spin_unlock_irqrestore(&hp->lock, flags);
1059 1059
1060 if (total != origcount) 1060 if (total != origcount)
1061 pr_debug("%s: wanted %i, only wrote %i\n", __FUNCTION__, origcount, 1061 pr_debug("%s: wanted %i, only wrote %i\n", __func__, origcount,
1062 total); 1062 total);
1063 1063
1064 return total; 1064 return total;
@@ -1072,7 +1072,7 @@ static void hvsi_throttle(struct tty_struct *tty)
1072{ 1072{
1073 struct hvsi_struct *hp = (struct hvsi_struct *)tty->driver_data; 1073 struct hvsi_struct *hp = (struct hvsi_struct *)tty->driver_data;
1074 1074
1075 pr_debug("%s\n", __FUNCTION__); 1075 pr_debug("%s\n", __func__);
1076 1076
1077 h_vio_signal(hp->vtermno, VIO_IRQ_DISABLE); 1077 h_vio_signal(hp->vtermno, VIO_IRQ_DISABLE);
1078} 1078}
@@ -1083,7 +1083,7 @@ static void hvsi_unthrottle(struct tty_struct *tty)
1083 unsigned long flags; 1083 unsigned long flags;
1084 int shouldflip = 0; 1084 int shouldflip = 0;
1085 1085
1086 pr_debug("%s\n", __FUNCTION__); 1086 pr_debug("%s\n", __func__);
1087 1087
1088 spin_lock_irqsave(&hp->lock, flags); 1088 spin_lock_irqsave(&hp->lock, flags);
1089 if (hp->n_throttle) { 1089 if (hp->n_throttle) {
@@ -1302,7 +1302,7 @@ static int __init hvsi_console_init(void)
1302 hp->virq = irq_create_mapping(NULL, irq[0]); 1302 hp->virq = irq_create_mapping(NULL, irq[0]);
1303 if (hp->virq == NO_IRQ) { 1303 if (hp->virq == NO_IRQ) {
1304 printk(KERN_ERR "%s: couldn't create irq mapping for 0x%x\n", 1304 printk(KERN_ERR "%s: couldn't create irq mapping for 0x%x\n",
1305 __FUNCTION__, irq[0]); 1305 __func__, irq[0]);
1306 continue; 1306 continue;
1307 } 1307 }
1308 1308