aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/irda/w83977af_ir.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/irda/w83977af_ir.c')
-rw-r--r--drivers/net/irda/w83977af_ir.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/drivers/net/irda/w83977af_ir.c b/drivers/net/irda/w83977af_ir.c
index 9fd2451b0fb2..002a6d769f21 100644
--- a/drivers/net/irda/w83977af_ir.c
+++ b/drivers/net/irda/w83977af_ir.c
@@ -114,7 +114,7 @@ static int __init w83977af_init(void)
114{ 114{
115 int i; 115 int i;
116 116
117 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 117 IRDA_DEBUG(0, "%s()\n", __func__ );
118 118
119 for (i=0; (io[i] < 2000) && (i < ARRAY_SIZE(dev_self)); i++) { 119 for (i=0; (io[i] < 2000) && (i < ARRAY_SIZE(dev_self)); i++) {
120 if (w83977af_open(i, io[i], irq[i], dma[i]) == 0) 120 if (w83977af_open(i, io[i], irq[i], dma[i]) == 0)
@@ -133,7 +133,7 @@ static void __exit w83977af_cleanup(void)
133{ 133{
134 int i; 134 int i;
135 135
136 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 136 IRDA_DEBUG(4, "%s()\n", __func__ );
137 137
138 for (i=0; i < ARRAY_SIZE(dev_self); i++) { 138 for (i=0; i < ARRAY_SIZE(dev_self); i++) {
139 if (dev_self[i]) 139 if (dev_self[i])
@@ -154,12 +154,12 @@ int w83977af_open(int i, unsigned int iobase, unsigned int irq,
154 struct w83977af_ir *self; 154 struct w83977af_ir *self;
155 int err; 155 int err;
156 156
157 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 157 IRDA_DEBUG(0, "%s()\n", __func__ );
158 158
159 /* Lock the port that we need */ 159 /* Lock the port that we need */
160 if (!request_region(iobase, CHIP_IO_EXTENT, driver_name)) { 160 if (!request_region(iobase, CHIP_IO_EXTENT, driver_name)) {
161 IRDA_DEBUG(0, "%s(), can't get iobase of 0x%03x\n", 161 IRDA_DEBUG(0, "%s(), can't get iobase of 0x%03x\n",
162 __FUNCTION__ , iobase); 162 __func__ , iobase);
163 return -ENODEV; 163 return -ENODEV;
164 } 164 }
165 165
@@ -241,7 +241,7 @@ int w83977af_open(int i, unsigned int iobase, unsigned int irq,
241 241
242 err = register_netdev(dev); 242 err = register_netdev(dev);
243 if (err) { 243 if (err) {
244 IRDA_ERROR("%s(), register_netdevice() failed!\n", __FUNCTION__); 244 IRDA_ERROR("%s(), register_netdevice() failed!\n", __func__);
245 goto err_out3; 245 goto err_out3;
246 } 246 }
247 IRDA_MESSAGE("IrDA: Registered device %s\n", dev->name); 247 IRDA_MESSAGE("IrDA: Registered device %s\n", dev->name);
@@ -273,7 +273,7 @@ static int w83977af_close(struct w83977af_ir *self)
273{ 273{
274 int iobase; 274 int iobase;
275 275
276 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 276 IRDA_DEBUG(0, "%s()\n", __func__ );
277 277
278 iobase = self->io.fir_base; 278 iobase = self->io.fir_base;
279 279
@@ -294,7 +294,7 @@ static int w83977af_close(struct w83977af_ir *self)
294 294
295 /* Release the PORT that this driver is using */ 295 /* Release the PORT that this driver is using */
296 IRDA_DEBUG(0 , "%s(), Releasing Region %03x\n", 296 IRDA_DEBUG(0 , "%s(), Releasing Region %03x\n",
297 __FUNCTION__ , self->io.fir_base); 297 __func__ , self->io.fir_base);
298 release_region(self->io.fir_base, self->io.fir_ext); 298 release_region(self->io.fir_base, self->io.fir_ext);
299 299
300 if (self->tx_buff.head) 300 if (self->tx_buff.head)
@@ -316,7 +316,7 @@ int w83977af_probe( int iobase, int irq, int dma)
316 int i; 316 int i;
317 317
318 for (i=0; i < 2; i++) { 318 for (i=0; i < 2; i++) {
319 IRDA_DEBUG( 0, "%s()\n", __FUNCTION__ ); 319 IRDA_DEBUG( 0, "%s()\n", __func__ );
320#ifdef CONFIG_USE_W977_PNP 320#ifdef CONFIG_USE_W977_PNP
321 /* Enter PnP configuration mode */ 321 /* Enter PnP configuration mode */
322 w977_efm_enter(efbase[i]); 322 w977_efm_enter(efbase[i]);
@@ -403,7 +403,7 @@ int w83977af_probe( int iobase, int irq, int dma)
403 return 0; 403 return 0;
404 } else { 404 } else {
405 /* Try next extented function register address */ 405 /* Try next extented function register address */
406 IRDA_DEBUG( 0, "%s(), Wrong chip version", __FUNCTION__ ); 406 IRDA_DEBUG( 0, "%s(), Wrong chip version", __func__ );
407 } 407 }
408 } 408 }
409 return -1; 409 return -1;
@@ -439,19 +439,19 @@ void w83977af_change_speed(struct w83977af_ir *self, __u32 speed)
439 case 115200: outb(0x01, iobase+ABLL); break; 439 case 115200: outb(0x01, iobase+ABLL); break;
440 case 576000: 440 case 576000:
441 ir_mode = HCR_MIR_576; 441 ir_mode = HCR_MIR_576;
442 IRDA_DEBUG(0, "%s(), handling baud of 576000\n", __FUNCTION__ ); 442 IRDA_DEBUG(0, "%s(), handling baud of 576000\n", __func__ );
443 break; 443 break;
444 case 1152000: 444 case 1152000:
445 ir_mode = HCR_MIR_1152; 445 ir_mode = HCR_MIR_1152;
446 IRDA_DEBUG(0, "%s(), handling baud of 1152000\n", __FUNCTION__ ); 446 IRDA_DEBUG(0, "%s(), handling baud of 1152000\n", __func__ );
447 break; 447 break;
448 case 4000000: 448 case 4000000:
449 ir_mode = HCR_FIR; 449 ir_mode = HCR_FIR;
450 IRDA_DEBUG(0, "%s(), handling baud of 4000000\n", __FUNCTION__ ); 450 IRDA_DEBUG(0, "%s(), handling baud of 4000000\n", __func__ );
451 break; 451 break;
452 default: 452 default:
453 ir_mode = HCR_FIR; 453 ir_mode = HCR_FIR;
454 IRDA_DEBUG(0, "%s(), unknown baud rate of %d\n", __FUNCTION__ , speed); 454 IRDA_DEBUG(0, "%s(), unknown baud rate of %d\n", __func__ , speed);
455 break; 455 break;
456 } 456 }
457 457
@@ -501,7 +501,7 @@ int w83977af_hard_xmit(struct sk_buff *skb, struct net_device *dev)
501 501
502 iobase = self->io.fir_base; 502 iobase = self->io.fir_base;
503 503
504 IRDA_DEBUG(4, "%s(%ld), skb->len=%d\n", __FUNCTION__ , jiffies, 504 IRDA_DEBUG(4, "%s(%ld), skb->len=%d\n", __func__ , jiffies,
505 (int) skb->len); 505 (int) skb->len);
506 506
507 /* Lock transmit buffer */ 507 /* Lock transmit buffer */
@@ -549,7 +549,7 @@ int w83977af_hard_xmit(struct sk_buff *skb, struct net_device *dev)
549 outb(ICR_ETMRI, iobase+ICR); 549 outb(ICR_ETMRI, iobase+ICR);
550 } else { 550 } else {
551#endif 551#endif
552 IRDA_DEBUG(4, "%s(%ld), mtt=%d\n", __FUNCTION__ , jiffies, mtt); 552 IRDA_DEBUG(4, "%s(%ld), mtt=%d\n", __func__ , jiffies, mtt);
553 if (mtt) 553 if (mtt)
554 udelay(mtt); 554 udelay(mtt);
555 555
@@ -591,7 +591,7 @@ static void w83977af_dma_write(struct w83977af_ir *self, int iobase)
591 unsigned long flags; 591 unsigned long flags;
592 __u8 hcr; 592 __u8 hcr;
593#endif 593#endif
594 IRDA_DEBUG(4, "%s(), len=%d\n", __FUNCTION__ , self->tx_buff.len); 594 IRDA_DEBUG(4, "%s(), len=%d\n", __func__ , self->tx_buff.len);
595 595
596 /* Save current set */ 596 /* Save current set */
597 set = inb(iobase+SSR); 597 set = inb(iobase+SSR);
@@ -643,7 +643,7 @@ static int w83977af_pio_write(int iobase, __u8 *buf, int len, int fifo_size)
643 int actual = 0; 643 int actual = 0;
644 __u8 set; 644 __u8 set;
645 645
646 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 646 IRDA_DEBUG(4, "%s()\n", __func__ );
647 647
648 /* Save current bank */ 648 /* Save current bank */
649 set = inb(iobase+SSR); 649 set = inb(iobase+SSR);
@@ -651,11 +651,11 @@ static int w83977af_pio_write(int iobase, __u8 *buf, int len, int fifo_size)
651 switch_bank(iobase, SET0); 651 switch_bank(iobase, SET0);
652 if (!(inb_p(iobase+USR) & USR_TSRE)) { 652 if (!(inb_p(iobase+USR) & USR_TSRE)) {
653 IRDA_DEBUG(4, 653 IRDA_DEBUG(4,
654 "%s(), warning, FIFO not empty yet!\n", __FUNCTION__ ); 654 "%s(), warning, FIFO not empty yet!\n", __func__ );
655 655
656 fifo_size -= 17; 656 fifo_size -= 17;
657 IRDA_DEBUG(4, "%s(), %d bytes left in tx fifo\n", 657 IRDA_DEBUG(4, "%s(), %d bytes left in tx fifo\n",
658 __FUNCTION__ , fifo_size); 658 __func__ , fifo_size);
659 } 659 }
660 660
661 /* Fill FIFO with current frame */ 661 /* Fill FIFO with current frame */
@@ -665,7 +665,7 @@ static int w83977af_pio_write(int iobase, __u8 *buf, int len, int fifo_size)
665 } 665 }
666 666
667 IRDA_DEBUG(4, "%s(), fifo_size %d ; %d sent of %d\n", 667 IRDA_DEBUG(4, "%s(), fifo_size %d ; %d sent of %d\n",
668 __FUNCTION__ , fifo_size, actual, len); 668 __func__ , fifo_size, actual, len);
669 669
670 /* Restore bank */ 670 /* Restore bank */
671 outb(set, iobase+SSR); 671 outb(set, iobase+SSR);
@@ -685,7 +685,7 @@ static void w83977af_dma_xmit_complete(struct w83977af_ir *self)
685 int iobase; 685 int iobase;
686 __u8 set; 686 __u8 set;
687 687
688 IRDA_DEBUG(4, "%s(%ld)\n", __FUNCTION__ , jiffies); 688 IRDA_DEBUG(4, "%s(%ld)\n", __func__ , jiffies);
689 689
690 IRDA_ASSERT(self != NULL, return;); 690 IRDA_ASSERT(self != NULL, return;);
691 691
@@ -700,7 +700,7 @@ static void w83977af_dma_xmit_complete(struct w83977af_ir *self)
700 700
701 /* Check for underrrun! */ 701 /* Check for underrrun! */
702 if (inb(iobase+AUDR) & AUDR_UNDR) { 702 if (inb(iobase+AUDR) & AUDR_UNDR) {
703 IRDA_DEBUG(0, "%s(), Transmit underrun!\n", __FUNCTION__ ); 703 IRDA_DEBUG(0, "%s(), Transmit underrun!\n", __func__ );
704 704
705 self->stats.tx_errors++; 705 self->stats.tx_errors++;
706 self->stats.tx_fifo_errors++; 706 self->stats.tx_fifo_errors++;
@@ -741,7 +741,7 @@ int w83977af_dma_receive(struct w83977af_ir *self)
741#endif 741#endif
742 IRDA_ASSERT(self != NULL, return -1;); 742 IRDA_ASSERT(self != NULL, return -1;);
743 743
744 IRDA_DEBUG(4, "%s\n", __FUNCTION__ ); 744 IRDA_DEBUG(4, "%s\n", __func__ );
745 745
746 iobase= self->io.fir_base; 746 iobase= self->io.fir_base;
747 747
@@ -812,7 +812,7 @@ int w83977af_dma_receive_complete(struct w83977af_ir *self)
812 __u8 set; 812 __u8 set;
813 __u8 status; 813 __u8 status;
814 814
815 IRDA_DEBUG(4, "%s\n", __FUNCTION__ ); 815 IRDA_DEBUG(4, "%s\n", __func__ );
816 816
817 st_fifo = &self->st_fifo; 817 st_fifo = &self->st_fifo;
818 818
@@ -892,7 +892,7 @@ int w83977af_dma_receive_complete(struct w83977af_ir *self)
892 skb = dev_alloc_skb(len+1); 892 skb = dev_alloc_skb(len+1);
893 if (skb == NULL) { 893 if (skb == NULL) {
894 printk(KERN_INFO 894 printk(KERN_INFO
895 "%s(), memory squeeze, dropping frame.\n", __FUNCTION__); 895 "%s(), memory squeeze, dropping frame.\n", __func__);
896 /* Restore set register */ 896 /* Restore set register */
897 outb(set, iobase+SSR); 897 outb(set, iobase+SSR);
898 898
@@ -943,7 +943,7 @@ static void w83977af_pio_receive(struct w83977af_ir *self)
943 __u8 byte = 0x00; 943 __u8 byte = 0x00;
944 int iobase; 944 int iobase;
945 945
946 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 946 IRDA_DEBUG(4, "%s()\n", __func__ );
947 947
948 IRDA_ASSERT(self != NULL, return;); 948 IRDA_ASSERT(self != NULL, return;);
949 949
@@ -970,7 +970,7 @@ static __u8 w83977af_sir_interrupt(struct w83977af_ir *self, int isr)
970 __u8 set; 970 __u8 set;
971 int iobase; 971 int iobase;
972 972
973 IRDA_DEBUG(4, "%s(), isr=%#x\n", __FUNCTION__ , isr); 973 IRDA_DEBUG(4, "%s(), isr=%#x\n", __func__ , isr);
974 974
975 iobase = self->io.fir_base; 975 iobase = self->io.fir_base;
976 /* Transmit FIFO low on data */ 976 /* Transmit FIFO low on data */
@@ -1007,7 +1007,7 @@ static __u8 w83977af_sir_interrupt(struct w83977af_ir *self, int isr)
1007 /* Check if we need to change the speed? */ 1007 /* Check if we need to change the speed? */
1008 if (self->new_speed) { 1008 if (self->new_speed) {
1009 IRDA_DEBUG(2, 1009 IRDA_DEBUG(2,
1010 "%s(), Changing speed!\n", __FUNCTION__ ); 1010 "%s(), Changing speed!\n", __func__ );
1011 w83977af_change_speed(self, self->new_speed); 1011 w83977af_change_speed(self, self->new_speed);
1012 self->new_speed = 0; 1012 self->new_speed = 0;
1013 } 1013 }
@@ -1189,7 +1189,7 @@ static int w83977af_net_open(struct net_device *dev)
1189 char hwname[32]; 1189 char hwname[32];
1190 __u8 set; 1190 __u8 set;
1191 1191
1192 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 1192 IRDA_DEBUG(0, "%s()\n", __func__ );
1193 1193
1194 IRDA_ASSERT(dev != NULL, return -1;); 1194 IRDA_ASSERT(dev != NULL, return -1;);
1195 self = (struct w83977af_ir *) dev->priv; 1195 self = (struct w83977af_ir *) dev->priv;
@@ -1252,7 +1252,7 @@ static int w83977af_net_close(struct net_device *dev)
1252 int iobase; 1252 int iobase;
1253 __u8 set; 1253 __u8 set;
1254 1254
1255 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 1255 IRDA_DEBUG(0, "%s()\n", __func__ );
1256 1256
1257 IRDA_ASSERT(dev != NULL, return -1;); 1257 IRDA_ASSERT(dev != NULL, return -1;);
1258 1258
@@ -1307,7 +1307,7 @@ static int w83977af_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
1307 1307
1308 IRDA_ASSERT(self != NULL, return -1;); 1308 IRDA_ASSERT(self != NULL, return -1;);
1309 1309
1310 IRDA_DEBUG(2, "%s(), %s, (cmd=0x%X)\n", __FUNCTION__ , dev->name, cmd); 1310 IRDA_DEBUG(2, "%s(), %s, (cmd=0x%X)\n", __func__ , dev->name, cmd);
1311 1311
1312 spin_lock_irqsave(&self->lock, flags); 1312 spin_lock_irqsave(&self->lock, flags);
1313 1313