Commit 16f0fbb6 authored by Jeff Garzik's avatar Jeff Garzik

Fix __FUNCTION__ breakage in several irda drivers

parent a859b481
...@@ -158,7 +158,7 @@ static int act200l_change_speed(struct irda_task *task) ...@@ -158,7 +158,7 @@ static int act200l_change_speed(struct irda_task *task)
} }
break; break;
case IRDA_TASK_CHILD_WAIT: case IRDA_TASK_CHILD_WAIT:
WARNING(__FUNCTION__ "(), resetting dongle timed out!\n"); WARNING("%s(), resetting dongle timed out!\n", __FUNCTION__);
ret = -1; ret = -1;
break; break;
case IRDA_TASK_CHILD_DONE: case IRDA_TASK_CHILD_DONE:
...@@ -203,7 +203,7 @@ static int act200l_change_speed(struct irda_task *task) ...@@ -203,7 +203,7 @@ static int act200l_change_speed(struct irda_task *task)
self->speed_task = NULL; self->speed_task = NULL;
break; break;
default: default:
ERROR(__FUNCTION__ "(), unknown state %d\n", task->state); ERROR("%s(), unknown state %d\n", __FUNCTION__, task->state);
irda_task_next_state(task, IRDA_TASK_DONE); irda_task_next_state(task, IRDA_TASK_DONE);
self->speed_task = NULL; self->speed_task = NULL;
ret = -1; ret = -1;
...@@ -269,7 +269,7 @@ static int act200l_reset(struct irda_task *task) ...@@ -269,7 +269,7 @@ static int act200l_reset(struct irda_task *task)
self->reset_task = NULL; self->reset_task = NULL;
break; break;
default: default:
ERROR(__FUNCTION__ "(), unknown state %d\n", task->state); ERROR("%s(), unknown state %d\n", __FUNCTION__, task->state);
irda_task_next_state(task, IRDA_TASK_DONE); irda_task_next_state(task, IRDA_TASK_DONE);
self->reset_task = NULL; self->reset_task = NULL;
ret = -1; ret = -1;
......
...@@ -259,7 +259,7 @@ static int actisys_reset(struct irda_task *task) ...@@ -259,7 +259,7 @@ static int actisys_reset(struct irda_task *task)
self->speed = 9600; /* That's the default */ self->speed = 9600; /* That's the default */
break; break;
default: default:
ERROR(__FUNCTION__ "(), unknown state %d\n", task->state); ERROR("%s(), unknown state %d\n", __FUNCTION__, task->state);
irda_task_next_state(task, IRDA_TASK_DONE); irda_task_next_state(task, IRDA_TASK_DONE);
self->reset_task = NULL; self->reset_task = NULL;
ret = -1; ret = -1;
......
...@@ -141,12 +141,12 @@ int __init ali_ircc_init(void) ...@@ -141,12 +141,12 @@ int __init ali_ircc_init(void)
int reg, revision; int reg, revision;
int i = 0; int i = 0;
IRDA_DEBUG(2, __FUNCTION__ "(), ---------------- Start ----------------\n"); IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__);
/* Probe for all the ALi chipsets we know about */ /* Probe for all the ALi chipsets we know about */
for (chip= chips; chip->name; chip++, i++) for (chip= chips; chip->name; chip++, i++)
{ {
IRDA_DEBUG(2, __FUNCTION__"(), Probing for %s ...\n", chip->name); IRDA_DEBUG(2, "%s(), Probing for %s ...\n", __FUNCTION__, chip->name);
/* Try all config registers for this chip */ /* Try all config registers for this chip */
for (cfg=0; cfg<2; cfg++) for (cfg=0; cfg<2; cfg++)
...@@ -176,13 +176,11 @@ int __init ali_ircc_init(void) ...@@ -176,13 +176,11 @@ int __init ali_ircc_init(void)
if (reg == chip->cid_value) if (reg == chip->cid_value)
{ {
IRDA_DEBUG(2, __FUNCTION__ IRDA_DEBUG(2, "%s(), Chip found at 0x%03x\n", __FUNCTION__, cfg_base);
"(), Chip found at 0x%03x\n", cfg_base);
outb(0x1F, cfg_base); outb(0x1F, cfg_base);
revision = inb(cfg_base+1); revision = inb(cfg_base+1);
IRDA_DEBUG(2, __FUNCTION__ IRDA_DEBUG(2, "%s(), Found %s chip, revision=%d\n", __FUNCTION__,
"(), Found %s chip, revision=%d\n",
chip->name, revision); chip->name, revision);
/* /*
...@@ -205,15 +203,14 @@ int __init ali_ircc_init(void) ...@@ -205,15 +203,14 @@ int __init ali_ircc_init(void)
} }
else else
{ {
IRDA_DEBUG(2, __FUNCTION__ IRDA_DEBUG(2, "%s(), No %s chip at 0x%03x\n", __FUNCTION__, chip->name, cfg_base);
"(), No %s chip at 0x%03x\n", chip->name, cfg_base);
} }
/* Exit configuration */ /* Exit configuration */
outb(0xbb, cfg_base); outb(0xbb, cfg_base);
} }
} }
IRDA_DEBUG(2, __FUNCTION__ "(), ----------------- End -----------------\n"); IRDA_DEBUG(2, "%s(), ----------------- End -----------------\n", __FUNCTION__);
return ret; return ret;
} }
...@@ -227,7 +224,7 @@ static void __exit ali_ircc_cleanup(void) ...@@ -227,7 +224,7 @@ static void __exit ali_ircc_cleanup(void)
{ {
int i; int i;
IRDA_DEBUG(2, __FUNCTION__ "(), ---------------- Start ----------------\n"); IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__);
pm_unregister_all(ali_ircc_pmproc); pm_unregister_all(ali_ircc_pmproc);
...@@ -236,7 +233,7 @@ static void __exit ali_ircc_cleanup(void) ...@@ -236,7 +233,7 @@ static void __exit ali_ircc_cleanup(void)
ali_ircc_close(dev_self[i]); ali_ircc_close(dev_self[i]);
} }
IRDA_DEBUG(2, __FUNCTION__ "(), ----------------- End -----------------\n"); IRDA_DEBUG(2, "%s(), ----------------- End -----------------\n", __FUNCTION__);
} }
/* /*
...@@ -254,7 +251,7 @@ static int ali_ircc_open(int i, chipio_t *info) ...@@ -254,7 +251,7 @@ static int ali_ircc_open(int i, chipio_t *info)
int ret; int ret;
int err; int err;
IRDA_DEBUG(2, __FUNCTION__ "(), ---------------- Start ----------------\n"); IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__);
/* Set FIR FIFO and DMA Threshold */ /* Set FIR FIFO and DMA Threshold */
if ((ali_ircc_setup(info)) == -1) if ((ali_ircc_setup(info)) == -1)
...@@ -264,7 +261,7 @@ static int ali_ircc_open(int i, chipio_t *info) ...@@ -264,7 +261,7 @@ static int ali_ircc_open(int i, chipio_t *info)
self = kmalloc(sizeof(struct ali_ircc_cb), GFP_KERNEL); self = kmalloc(sizeof(struct ali_ircc_cb), GFP_KERNEL);
if (self == NULL) if (self == NULL)
{ {
ERROR(__FUNCTION__ "(), can't allocate memory for control block!\n"); ERROR("%s(), can't allocate memory for control block!\n", __FUNCTION__);
return -ENOMEM; return -ENOMEM;
} }
memset(self, 0, sizeof(struct ali_ircc_cb)); memset(self, 0, sizeof(struct ali_ircc_cb));
...@@ -286,7 +283,7 @@ static int ali_ircc_open(int i, chipio_t *info) ...@@ -286,7 +283,7 @@ static int ali_ircc_open(int i, chipio_t *info)
/* Reserve the ioports that we need */ /* Reserve the ioports that we need */
ret = check_region(self->io.fir_base, self->io.fir_ext); ret = check_region(self->io.fir_base, self->io.fir_ext);
if (ret < 0) { if (ret < 0) {
WARNING(__FUNCTION__ "(), can't get iobase of 0x%03x\n", WARNING("%s(), can't get iobase of 0x%03x\n", __FUNCTION__,
self->io.fir_base); self->io.fir_base);
dev_self[i] = NULL; dev_self[i] = NULL;
kfree(self); kfree(self);
...@@ -340,7 +337,7 @@ static int ali_ircc_open(int i, chipio_t *info) ...@@ -340,7 +337,7 @@ static int ali_ircc_open(int i, chipio_t *info)
self->tx_fifo.tail = self->tx_buff.head; self->tx_fifo.tail = self->tx_buff.head;
if (!(dev = dev_alloc("irda%d", &err))) { if (!(dev = dev_alloc("irda%d", &err))) {
ERROR(__FUNCTION__ "(), dev_alloc() failed!\n"); ERROR("%s(), dev_alloc() failed!\n", __FUNCTION__);
return -ENOMEM; return -ENOMEM;
} }
...@@ -359,14 +356,14 @@ static int ali_ircc_open(int i, chipio_t *info) ...@@ -359,14 +356,14 @@ static int ali_ircc_open(int i, chipio_t *info)
err = register_netdevice(dev); err = register_netdevice(dev);
rtnl_unlock(); rtnl_unlock();
if (err) { if (err) {
ERROR(__FUNCTION__ "(), register_netdev() failed!\n"); ERROR("%s(), register_netdev() failed!\n", __FUNCTION__);
return -1; return -1;
} }
MESSAGE("IrDA: Registered device %s\n", dev->name); MESSAGE("IrDA: Registered device %s\n", dev->name);
/* Check dongle id */ /* Check dongle id */
dongle_id = ali_ircc_read_dongle_id(i, info); dongle_id = ali_ircc_read_dongle_id(i, info);
MESSAGE(__FUNCTION__ "(), %s, Found dongle: %s\n", driver_name, dongle_types[dongle_id]); MESSAGE("%s(), %s, Found dongle: %s\n", __FUNCTION__, driver_name, dongle_types[dongle_id]);
self->io.dongle_id = dongle_id; self->io.dongle_id = dongle_id;
...@@ -374,7 +371,7 @@ static int ali_ircc_open(int i, chipio_t *info) ...@@ -374,7 +371,7 @@ static int ali_ircc_open(int i, chipio_t *info)
if (pmdev) if (pmdev)
pmdev->data = self; pmdev->data = self;
IRDA_DEBUG(2, __FUNCTION__ "(), ----------------- End -----------------\n"); IRDA_DEBUG(2, "%s(), ----------------- End -----------------\n", __FUNCTION__);
return 0; return 0;
} }
...@@ -390,7 +387,7 @@ static int __exit ali_ircc_close(struct ali_ircc_cb *self) ...@@ -390,7 +387,7 @@ static int __exit ali_ircc_close(struct ali_ircc_cb *self)
{ {
int iobase; int iobase;
IRDA_DEBUG(4, __FUNCTION__ "(), ---------------- Start ----------------\n"); IRDA_DEBUG(4, "%s(), ---------------- Start ----------------\n", __FUNCTION__);
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
...@@ -404,7 +401,7 @@ static int __exit ali_ircc_close(struct ali_ircc_cb *self) ...@@ -404,7 +401,7 @@ static int __exit ali_ircc_close(struct ali_ircc_cb *self)
} }
/* Release the PORT that this driver is using */ /* Release the PORT that this driver is using */
IRDA_DEBUG(4, __FUNCTION__ "(), Releasing Region %03x\n", self->io.fir_base); IRDA_DEBUG(4, "%s(), Releasing Region %03x\n", __FUNCTION__, self->io.fir_base);
release_region(self->io.fir_base, self->io.fir_ext); release_region(self->io.fir_base, self->io.fir_ext);
if (self->tx_buff.head) if (self->tx_buff.head)
...@@ -416,7 +413,7 @@ static int __exit ali_ircc_close(struct ali_ircc_cb *self) ...@@ -416,7 +413,7 @@ static int __exit ali_ircc_close(struct ali_ircc_cb *self)
dev_self[self->index] = NULL; dev_self[self->index] = NULL;
kfree(self); kfree(self);
IRDA_DEBUG(2, __FUNCTION__ "(), ----------------- End -----------------\n"); IRDA_DEBUG(2, "%s(), ----------------- End -----------------\n", __FUNCTION__);
return 0; return 0;
} }
...@@ -459,7 +456,7 @@ static int ali_ircc_probe_53(ali_chip_t *chip, chipio_t *info) ...@@ -459,7 +456,7 @@ static int ali_ircc_probe_53(ali_chip_t *chip, chipio_t *info)
int cfg_base = info->cfg_base; int cfg_base = info->cfg_base;
int hi, low, reg; int hi, low, reg;
IRDA_DEBUG(2, __FUNCTION__ "(), ---------------- Start ----------------\n"); IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__);
/* Enter Configuration */ /* Enter Configuration */
outb(chip->entr1, cfg_base); outb(chip->entr1, cfg_base);
...@@ -478,13 +475,13 @@ static int ali_ircc_probe_53(ali_chip_t *chip, chipio_t *info) ...@@ -478,13 +475,13 @@ static int ali_ircc_probe_53(ali_chip_t *chip, chipio_t *info)
info->sir_base = info->fir_base; info->sir_base = info->fir_base;
IRDA_DEBUG(2, __FUNCTION__ "(), probing fir_base=0x%03x\n", info->fir_base); IRDA_DEBUG(2, "%s(), probing fir_base=0x%03x\n", __FUNCTION__, info->fir_base);
/* Read IRQ control register */ /* Read IRQ control register */
outb(0x70, cfg_base); outb(0x70, cfg_base);
reg = inb(cfg_base+1); reg = inb(cfg_base+1);
info->irq = reg & 0x0f; info->irq = reg & 0x0f;
IRDA_DEBUG(2, __FUNCTION__ "(), probing irq=%d\n", info->irq); IRDA_DEBUG(2, "%s(), probing irq=%d\n", __FUNCTION__, info->irq);
/* Read DMA channel */ /* Read DMA channel */
outb(0x74, cfg_base); outb(0x74, cfg_base);
...@@ -492,26 +489,26 @@ static int ali_ircc_probe_53(ali_chip_t *chip, chipio_t *info) ...@@ -492,26 +489,26 @@ static int ali_ircc_probe_53(ali_chip_t *chip, chipio_t *info)
info->dma = reg & 0x07; info->dma = reg & 0x07;
if(info->dma == 0x04) if(info->dma == 0x04)
WARNING(__FUNCTION__ "(), No DMA channel assigned !\n"); WARNING("%s(), No DMA channel assigned !\n", __FUNCTION__);
else else
IRDA_DEBUG(2, __FUNCTION__ "(), probing dma=%d\n", info->dma); IRDA_DEBUG(2, "%s(), probing dma=%d\n", __FUNCTION__, info->dma);
/* Read Enabled Status */ /* Read Enabled Status */
outb(0x30, cfg_base); outb(0x30, cfg_base);
reg = inb(cfg_base+1); reg = inb(cfg_base+1);
info->enabled = (reg & 0x80) && (reg & 0x01); info->enabled = (reg & 0x80) && (reg & 0x01);
IRDA_DEBUG(2, __FUNCTION__ "(), probing enabled=%d\n", info->enabled); IRDA_DEBUG(2, "%s(), probing enabled=%d\n", __FUNCTION__, info->enabled);
/* Read Power Status */ /* Read Power Status */
outb(0x22, cfg_base); outb(0x22, cfg_base);
reg = inb(cfg_base+1); reg = inb(cfg_base+1);
info->suspended = (reg & 0x20); info->suspended = (reg & 0x20);
IRDA_DEBUG(2, __FUNCTION__ "(), probing suspended=%d\n", info->suspended); IRDA_DEBUG(2, "%s(), probing suspended=%d\n", __FUNCTION__, info->suspended);
/* Exit configuration */ /* Exit configuration */
outb(0xbb, cfg_base); outb(0xbb, cfg_base);
IRDA_DEBUG(2, __FUNCTION__ "(), ----------------- End -----------------\n"); IRDA_DEBUG(2, "%s(), ----------------- End -----------------\n", __FUNCTION__);
return 0; return 0;
} }
...@@ -529,7 +526,7 @@ static int ali_ircc_setup(chipio_t *info) ...@@ -529,7 +526,7 @@ static int ali_ircc_setup(chipio_t *info)
int version; int version;
int iobase = info->fir_base; int iobase = info->fir_base;
IRDA_DEBUG(2, __FUNCTION__ "(), ---------------- Start ----------------\n"); IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__);
/* Locking comments : /* Locking comments :
* Most operations here need to be protected. We are called before * Most operations here need to be protected. We are called before
...@@ -590,7 +587,7 @@ static int ali_ircc_setup(chipio_t *info) ...@@ -590,7 +587,7 @@ static int ali_ircc_setup(chipio_t *info)
// outb(UART_IER_RDI, iobase+UART_IER); //benjamin 2000/11/23 01:25PM // outb(UART_IER_RDI, iobase+UART_IER); //benjamin 2000/11/23 01:25PM
// Turn on the interrupts in ali_ircc_net_open // Turn on the interrupts in ali_ircc_net_open
IRDA_DEBUG(2, __FUNCTION__ "(), ----------------- End ------------------\n"); IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__);
return 0; return 0;
} }
...@@ -607,7 +604,7 @@ static int ali_ircc_read_dongle_id (int i, chipio_t *info) ...@@ -607,7 +604,7 @@ static int ali_ircc_read_dongle_id (int i, chipio_t *info)
int dongle_id, reg; int dongle_id, reg;
int cfg_base = info->cfg_base; int cfg_base = info->cfg_base;
IRDA_DEBUG(2, __FUNCTION__ "(), ---------------- Start ----------------\n"); IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__);
/* Enter Configuration */ /* Enter Configuration */
outb(chips[i].entr1, cfg_base); outb(chips[i].entr1, cfg_base);
...@@ -621,13 +618,13 @@ static int ali_ircc_read_dongle_id (int i, chipio_t *info) ...@@ -621,13 +618,13 @@ static int ali_ircc_read_dongle_id (int i, chipio_t *info)
outb(0xf0, cfg_base); outb(0xf0, cfg_base);
reg = inb(cfg_base+1); reg = inb(cfg_base+1);
dongle_id = ((reg>>6)&0x02) | ((reg>>5)&0x01); dongle_id = ((reg>>6)&0x02) | ((reg>>5)&0x01);
IRDA_DEBUG(2, __FUNCTION__ "(), probing dongle_id=%d, dongle_types=%s\n", IRDA_DEBUG(2, "%s(), probing dongle_id=%d, dongle_types=%s\n", __FUNCTION__,
dongle_id, dongle_types[dongle_id]); dongle_id, dongle_types[dongle_id]);
/* Exit configuration */ /* Exit configuration */
outb(0xbb, cfg_base); outb(0xbb, cfg_base);
IRDA_DEBUG(2, __FUNCTION__ "(), ----------------- End ------------------\n"); IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__);
return dongle_id; return dongle_id;
} }
...@@ -643,7 +640,7 @@ static void ali_ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -643,7 +640,7 @@ static void ali_ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
struct net_device *dev = (struct net_device *) dev_id; struct net_device *dev = (struct net_device *) dev_id;
struct ali_ircc_cb *self; struct ali_ircc_cb *self;
IRDA_DEBUG(2, __FUNCTION__ "(), ---------------- Start ----------------\n"); IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__);
if (!dev) { if (!dev) {
WARNING("%s: irq %d for unknown device.\n", driver_name, irq); WARNING("%s: irq %d for unknown device.\n", driver_name, irq);
...@@ -662,7 +659,7 @@ static void ali_ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -662,7 +659,7 @@ static void ali_ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
spin_unlock(&self->lock); spin_unlock(&self->lock);
IRDA_DEBUG(2, __FUNCTION__ "(), ----------------- End ------------------\n"); IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__);
} }
/* /*
* Function ali_ircc_fir_interrupt(irq, struct ali_ircc_cb *self, regs) * Function ali_ircc_fir_interrupt(irq, struct ali_ircc_cb *self, regs)
...@@ -675,7 +672,7 @@ static void ali_ircc_fir_interrupt(int irq, struct ali_ircc_cb *self, struct pt_ ...@@ -675,7 +672,7 @@ static void ali_ircc_fir_interrupt(int irq, struct ali_ircc_cb *self, struct pt_
__u8 eir, OldMessageCount; __u8 eir, OldMessageCount;
int iobase, tmp; int iobase, tmp;
IRDA_DEBUG(1, __FUNCTION__ "(), ---------------- Start ----------------\n"); IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __FUNCTION__);
iobase = self->io.fir_base; iobase = self->io.fir_base;
...@@ -688,10 +685,10 @@ static void ali_ircc_fir_interrupt(int irq, struct ali_ircc_cb *self, struct pt_ ...@@ -688,10 +685,10 @@ static void ali_ircc_fir_interrupt(int irq, struct ali_ircc_cb *self, struct pt_
//self->ier = inb(iobase+FIR_IER); 2000/12/1 04:32PM //self->ier = inb(iobase+FIR_IER); 2000/12/1 04:32PM
eir = self->InterruptID & self->ier; /* Mask out the interesting ones */ eir = self->InterruptID & self->ier; /* Mask out the interesting ones */
IRDA_DEBUG(1, __FUNCTION__ "(), self->InterruptID = %x\n",self->InterruptID); IRDA_DEBUG(1, "%s(), self->InterruptID = %x\n", __FUNCTION__,self->InterruptID);
IRDA_DEBUG(1, __FUNCTION__ "(), self->LineStatus = %x\n",self->LineStatus); IRDA_DEBUG(1, "%s(), self->LineStatus = %x\n", __FUNCTION__,self->LineStatus);
IRDA_DEBUG(1, __FUNCTION__ "(), self->ier = %x\n",self->ier); IRDA_DEBUG(1, "%s(), self->ier = %x\n", __FUNCTION__,self->ier);
IRDA_DEBUG(1, __FUNCTION__ "(), eir = %x\n",eir); IRDA_DEBUG(1, "%s(), eir = %x\n", __FUNCTION__,eir);
/* Disable interrupts */ /* Disable interrupts */
SetCOMInterrupts(self, FALSE); SetCOMInterrupts(self, FALSE);
...@@ -702,7 +699,7 @@ static void ali_ircc_fir_interrupt(int irq, struct ali_ircc_cb *self, struct pt_ ...@@ -702,7 +699,7 @@ static void ali_ircc_fir_interrupt(int irq, struct ali_ircc_cb *self, struct pt_
{ {
if (self->io.direction == IO_XMIT) /* TX */ if (self->io.direction == IO_XMIT) /* TX */
{ {
IRDA_DEBUG(1, __FUNCTION__ "(), ******* IIR_EOM (Tx) *******\n"); IRDA_DEBUG(1, "%s(), ******* IIR_EOM (Tx) *******\n", __FUNCTION__);
if(ali_ircc_dma_xmit_complete(self)) if(ali_ircc_dma_xmit_complete(self))
{ {
...@@ -721,23 +718,23 @@ static void ali_ircc_fir_interrupt(int irq, struct ali_ircc_cb *self, struct pt_ ...@@ -721,23 +718,23 @@ static void ali_ircc_fir_interrupt(int irq, struct ali_ircc_cb *self, struct pt_
} }
else /* RX */ else /* RX */
{ {
IRDA_DEBUG(1, __FUNCTION__ "(), ******* IIR_EOM (Rx) *******\n"); IRDA_DEBUG(1, "%s(), ******* IIR_EOM (Rx) *******\n", __FUNCTION__);
if(OldMessageCount > ((self->LineStatus+1) & 0x07)) if(OldMessageCount > ((self->LineStatus+1) & 0x07))
{ {
self->rcvFramesOverflow = TRUE; self->rcvFramesOverflow = TRUE;
IRDA_DEBUG(1, __FUNCTION__ "(), ******* self->rcvFramesOverflow = TRUE ******** \n"); IRDA_DEBUG(1, "%s(), ******* self->rcvFramesOverflow = TRUE ******** \n", __FUNCTION__);
} }
if (ali_ircc_dma_receive_complete(self)) if (ali_ircc_dma_receive_complete(self))
{ {
IRDA_DEBUG(1, __FUNCTION__ "(), ******* receive complete ******** \n"); IRDA_DEBUG(1, "%s(), ******* receive complete ******** \n", __FUNCTION__);
self->ier = IER_EOM; self->ier = IER_EOM;
} }
else else
{ {
IRDA_DEBUG(1, __FUNCTION__ "(), ******* Not receive complete ******** \n"); IRDA_DEBUG(1, "%s(), ******* Not receive complete ******** \n", __FUNCTION__);
self->ier = IER_EOM | IER_TIMER; self->ier = IER_EOM | IER_TIMER;
} }
...@@ -750,7 +747,7 @@ static void ali_ircc_fir_interrupt(int irq, struct ali_ircc_cb *self, struct pt_ ...@@ -750,7 +747,7 @@ static void ali_ircc_fir_interrupt(int irq, struct ali_ircc_cb *self, struct pt_
if(OldMessageCount > ((self->LineStatus+1) & 0x07)) if(OldMessageCount > ((self->LineStatus+1) & 0x07))
{ {
self->rcvFramesOverflow = TRUE; self->rcvFramesOverflow = TRUE;
IRDA_DEBUG(1, __FUNCTION__ "(), ******* self->rcvFramesOverflow = TRUE ******* \n"); IRDA_DEBUG(1, "%s(), ******* self->rcvFramesOverflow = TRUE ******* \n", __FUNCTION__);
} }
/* Disable Timer */ /* Disable Timer */
switch_bank(iobase, BANK1); switch_bank(iobase, BANK1);
...@@ -782,7 +779,7 @@ static void ali_ircc_fir_interrupt(int irq, struct ali_ircc_cb *self, struct pt_ ...@@ -782,7 +779,7 @@ static void ali_ircc_fir_interrupt(int irq, struct ali_ircc_cb *self, struct pt_
/* Restore Interrupt */ /* Restore Interrupt */
SetCOMInterrupts(self, TRUE); SetCOMInterrupts(self, TRUE);
IRDA_DEBUG(1, __FUNCTION__ "(), ----------------- End ---------------\n"); IRDA_DEBUG(1, "%s(), ----------------- End ---------------\n", __FUNCTION__);
} }
/* /*
...@@ -796,7 +793,7 @@ static void ali_ircc_sir_interrupt(int irq, struct ali_ircc_cb *self, struct pt_ ...@@ -796,7 +793,7 @@ static void ali_ircc_sir_interrupt(int irq, struct ali_ircc_cb *self, struct pt_
int iobase; int iobase;
int iir, lsr; int iir, lsr;
IRDA_DEBUG(2, __FUNCTION__ "(), ---------------- Start ----------------\n"); IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__);
iobase = self->io.sir_base; iobase = self->io.sir_base;
...@@ -805,14 +802,13 @@ static void ali_ircc_sir_interrupt(int irq, struct ali_ircc_cb *self, struct pt_ ...@@ -805,14 +802,13 @@ static void ali_ircc_sir_interrupt(int irq, struct ali_ircc_cb *self, struct pt_
/* Clear interrupt */ /* Clear interrupt */
lsr = inb(iobase+UART_LSR); lsr = inb(iobase+UART_LSR);
IRDA_DEBUG(4, __FUNCTION__ IRDA_DEBUG(4, "%s(), iir=%02x, lsr=%02x, iobase=%#x\n", __FUNCTION__,
"(), iir=%02x, lsr=%02x, iobase=%#x\n",
iir, lsr, iobase); iir, lsr, iobase);
switch (iir) switch (iir)
{ {
case UART_IIR_RLSI: case UART_IIR_RLSI:
IRDA_DEBUG(2, __FUNCTION__ "(), RLSI\n"); IRDA_DEBUG(2, "%s(), RLSI\n", __FUNCTION__);
break; break;
case UART_IIR_RDI: case UART_IIR_RDI:
/* Receive interrupt */ /* Receive interrupt */
...@@ -826,14 +822,14 @@ static void ali_ircc_sir_interrupt(int irq, struct ali_ircc_cb *self, struct pt_ ...@@ -826,14 +822,14 @@ static void ali_ircc_sir_interrupt(int irq, struct ali_ircc_cb *self, struct pt_
} }
break; break;
default: default:
IRDA_DEBUG(0, __FUNCTION__ "(), unhandled IIR=%#x\n", iir); IRDA_DEBUG(0, "%s(), unhandled IIR=%#x\n", __FUNCTION__, iir);
break; break;
} }
} }
IRDA_DEBUG(2, __FUNCTION__ "(), ----------------- End ------------------\n"); IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__);
} }
...@@ -848,7 +844,7 @@ static void ali_ircc_sir_receive(struct ali_ircc_cb *self) ...@@ -848,7 +844,7 @@ static void ali_ircc_sir_receive(struct ali_ircc_cb *self)
int boguscount = 0; int boguscount = 0;
int iobase; int iobase;
IRDA_DEBUG(2, __FUNCTION__ "(), ---------------- Start ----------------\n"); IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
iobase = self->io.sir_base; iobase = self->io.sir_base;
...@@ -863,7 +859,7 @@ static void ali_ircc_sir_receive(struct ali_ircc_cb *self) ...@@ -863,7 +859,7 @@ static void ali_ircc_sir_receive(struct ali_ircc_cb *self)
/* Make sure we don't stay here to long */ /* Make sure we don't stay here to long */
if (boguscount++ > 32) { if (boguscount++ > 32) {
IRDA_DEBUG(2,__FUNCTION__ "(), breaking!\n"); IRDA_DEBUG(2,"%s(), breaking!\n", __FUNCTION__);
break; break;
} }
} while (inb(iobase+UART_LSR) & UART_LSR_DR); } while (inb(iobase+UART_LSR) & UART_LSR_DR);
...@@ -1662,7 +1658,7 @@ static int ali_ircc_dma_xmit_complete(struct ali_ircc_cb *self) ...@@ -1662,7 +1658,7 @@ static int ali_ircc_dma_xmit_complete(struct ali_ircc_cb *self)
if((inb(iobase+FIR_LSR) & LSR_FRAME_ABORT) == LSR_FRAME_ABORT) if((inb(iobase+FIR_LSR) & LSR_FRAME_ABORT) == LSR_FRAME_ABORT)
{ {
ERROR(__FUNCTION__ "(), ********* LSR_FRAME_ABORT *********\n"); ERROR("%s(), ********* LSR_FRAME_ABORT *********\n", __FUNCTION__);
self->stats.tx_errors++; self->stats.tx_errors++;
self->stats.tx_fifo_errors++; self->stats.tx_fifo_errors++;
} }
...@@ -1909,8 +1905,8 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self) ...@@ -1909,8 +1905,8 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self)
skb = dev_alloc_skb(len+1); skb = dev_alloc_skb(len+1);
if (skb == NULL) if (skb == NULL)
{ {
WARNING(__FUNCTION__ "(), memory squeeze, " WARNING("%s(), memory squeeze, "
"dropping frame.\n"); "dropping frame.\n", __FUNCTION__);
self->stats.rx_dropped++; self->stats.rx_dropped++;
return FALSE; return FALSE;
......
...@@ -129,7 +129,7 @@ static int girbil_change_speed(struct irda_task *task) ...@@ -129,7 +129,7 @@ static int girbil_change_speed(struct irda_task *task)
} }
break; break;
case IRDA_TASK_CHILD_WAIT: case IRDA_TASK_CHILD_WAIT:
WARNING(__FUNCTION__ "(), resetting dongle timed out!\n"); WARNING("%s(), resetting dongle timed out!\n", __FUNCTION__);
ret = -1; ret = -1;
break; break;
case IRDA_TASK_CHILD_DONE: case IRDA_TASK_CHILD_DONE:
...@@ -168,7 +168,7 @@ static int girbil_change_speed(struct irda_task *task) ...@@ -168,7 +168,7 @@ static int girbil_change_speed(struct irda_task *task)
self->speed_task = NULL; self->speed_task = NULL;
break; break;
default: default:
ERROR(__FUNCTION__ "(), unknown state %d\n", task->state); ERROR("%s(), unknown state %d\n", __FUNCTION__, task->state);
irda_task_next_state(task, IRDA_TASK_DONE); irda_task_next_state(task, IRDA_TASK_DONE);
self->speed_task = NULL; self->speed_task = NULL;
ret = -1; ret = -1;
...@@ -221,7 +221,7 @@ static int girbil_reset(struct irda_task *task) ...@@ -221,7 +221,7 @@ static int girbil_reset(struct irda_task *task)
self->reset_task = NULL; self->reset_task = NULL;
break; break;
default: default:
ERROR(__FUNCTION__ "(), unknown state %d\n", task->state); ERROR("%s(), unknown state %d\n", __FUNCTION__, task->state);
irda_task_next_state(task, IRDA_TASK_DONE); irda_task_next_state(task, IRDA_TASK_DONE);
self->reset_task = NULL; self->reset_task = NULL;
ret = -1; ret = -1;
......
...@@ -124,7 +124,7 @@ static void __exit irport_cleanup(void) ...@@ -124,7 +124,7 @@ static void __exit irport_cleanup(void)
{ {
int i; int i;
IRDA_DEBUG( 4, __FUNCTION__ "()\n"); IRDA_DEBUG( 4, "%s()\n", __FUNCTION__);
for (i=0; i < 4; i++) { for (i=0; i < 4; i++) {
if (dev_self[i]) if (dev_self[i])
...@@ -140,15 +140,15 @@ irport_open(int i, unsigned int iobase, unsigned int irq) ...@@ -140,15 +140,15 @@ irport_open(int i, unsigned int iobase, unsigned int irq)
void *ret; void *ret;
int err; int err;
IRDA_DEBUG(1, __FUNCTION__ "()\n"); IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
/* /*
* Allocate new instance of the driver * Allocate new instance of the driver
*/ */
self = kmalloc(sizeof(struct irport_cb), GFP_KERNEL); self = kmalloc(sizeof(struct irport_cb), GFP_KERNEL);
if (!self) { if (!self) {
ERROR(__FUNCTION__ "(), can't allocate memory for " ERROR("%s(), can't allocate memory for "
"control block!\n"); "control block!\n", __FUNCTION__);
return NULL; return NULL;
} }
memset(self, 0, sizeof(struct irport_cb)); memset(self, 0, sizeof(struct irport_cb));
...@@ -168,8 +168,8 @@ irport_open(int i, unsigned int iobase, unsigned int irq) ...@@ -168,8 +168,8 @@ irport_open(int i, unsigned int iobase, unsigned int irq)
/* Lock the port that we need */ /* Lock the port that we need */
ret = request_region(self->io.sir_base, self->io.sir_ext, driver_name); ret = request_region(self->io.sir_base, self->io.sir_ext, driver_name);
if (!ret) { if (!ret) {
IRDA_DEBUG(0, __FUNCTION__ "(), can't get iobase of 0x%03x\n", IRDA_DEBUG(0, "%s(), can't get iobase of 0x%03x\n",
self->io.sir_base); __FUNCTION__, self->io.sir_base);
return NULL; return NULL;
} }
...@@ -212,7 +212,7 @@ irport_open(int i, unsigned int iobase, unsigned int irq) ...@@ -212,7 +212,7 @@ irport_open(int i, unsigned int iobase, unsigned int irq)
self->mode = IRDA_IRLAP; self->mode = IRDA_IRLAP;
if (!(dev = dev_alloc("irda%d", &err))) { if (!(dev = dev_alloc("irda%d", &err))) {
ERROR(__FUNCTION__ "(), dev_alloc() failed!\n"); ERROR("%s(), dev_alloc() failed!\n", __FUNCTION__);
return NULL; return NULL;
} }
self->netdev = dev; self->netdev = dev;
...@@ -240,7 +240,7 @@ irport_open(int i, unsigned int iobase, unsigned int irq) ...@@ -240,7 +240,7 @@ irport_open(int i, unsigned int iobase, unsigned int irq)
err = register_netdevice(dev); err = register_netdevice(dev);
rtnl_unlock(); rtnl_unlock();
if (err) { if (err) {
ERROR(__FUNCTION__ "(), register_netdev() failed!\n"); ERROR("%s(), register_netdev() failed!\n", __FUNCTION__);
return NULL; return NULL;
} }
MESSAGE("IrDA: Registered device %s\n", dev->name); MESSAGE("IrDA: Registered device %s\n", dev->name);
...@@ -265,8 +265,8 @@ int irport_close(struct irport_cb *self) ...@@ -265,8 +265,8 @@ int irport_close(struct irport_cb *self)
} }
/* Release the IO-port that this driver is using */ /* Release the IO-port that this driver is using */
IRDA_DEBUG(0 , __FUNCTION__ "(), Releasing Region %03x\n", IRDA_DEBUG(0 , "%s(), Releasing Region %03x\n",
self->io.sir_base); __FUNCTION__, self->io.sir_base);
release_region(self->io.sir_base, self->io.sir_ext); release_region(self->io.sir_base, self->io.sir_ext);
if (self->tx_buff.head) if (self->tx_buff.head)
...@@ -323,7 +323,7 @@ void irport_stop(struct irport_cb *self) ...@@ -323,7 +323,7 @@ void irport_stop(struct irport_cb *self)
*/ */
int irport_probe(int iobase) int irport_probe(int iobase)
{ {
IRDA_DEBUG(4, __FUNCTION__ "(), iobase=%#x\n", iobase); IRDA_DEBUG(4, "%s(), iobase=%#x\n", __FUNCTION__, iobase);
return 0; return 0;
} }
...@@ -402,7 +402,7 @@ int __irport_change_speed(struct irda_task *task) ...@@ -402,7 +402,7 @@ int __irport_change_speed(struct irda_task *task)
int wasunlocked = 0; int wasunlocked = 0;
int ret = 0; int ret = 0;
IRDA_DEBUG(2, __FUNCTION__ "(), <%ld>\n", jiffies); IRDA_DEBUG(2, "%s(), <%ld>\n", __FUNCTION__, jiffies);
self = (struct irport_cb *) task->instance; self = (struct irport_cb *) task->instance;
...@@ -455,8 +455,7 @@ int __irport_change_speed(struct irda_task *task) ...@@ -455,8 +455,7 @@ int __irport_change_speed(struct irda_task *task)
irda_task_next_state(task, IRDA_TASK_CHILD_DONE); irda_task_next_state(task, IRDA_TASK_CHILD_DONE);
break; break;
case IRDA_TASK_CHILD_WAIT: case IRDA_TASK_CHILD_WAIT:
WARNING(__FUNCTION__ WARNING("%s(), changing speed of dongle timed out!\n", __FUNCTION__);
"(), changing speed of dongle timed out!\n");
ret = -1; ret = -1;
break; break;
case IRDA_TASK_CHILD_DONE: case IRDA_TASK_CHILD_DONE:
...@@ -466,7 +465,7 @@ int __irport_change_speed(struct irda_task *task) ...@@ -466,7 +465,7 @@ int __irport_change_speed(struct irda_task *task)
irda_task_next_state(task, IRDA_TASK_DONE); irda_task_next_state(task, IRDA_TASK_DONE);
break; break;
default: default:
ERROR(__FUNCTION__ "(), unknown state %d\n", task->state); ERROR("%s(), unknown state %d\n", __FUNCTION__, task->state);
irda_task_next_state(task, IRDA_TASK_DONE); irda_task_next_state(task, IRDA_TASK_DONE);
ret = -1; ret = -1;
break; break;
...@@ -494,7 +493,7 @@ static void irport_write_wakeup(struct irport_cb *self) ...@@ -494,7 +493,7 @@ static void irport_write_wakeup(struct irport_cb *self)
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
iobase = self->io.sir_base; iobase = self->io.sir_base;
...@@ -556,7 +555,7 @@ static int irport_write(int iobase, int fifo_size, __u8 *buf, int len) ...@@ -556,7 +555,7 @@ static int irport_write(int iobase, int fifo_size, __u8 *buf, int len)
/* Tx FIFO should be empty! */ /* Tx FIFO should be empty! */
if (!(inb(iobase+UART_LSR) & UART_LSR_THRE)) { if (!(inb(iobase+UART_LSR) & UART_LSR_THRE)) {
IRDA_DEBUG(0, __FUNCTION__ "(), failed, fifo not empty!\n"); IRDA_DEBUG(0, "%s(), failed, fifo not empty!\n", __FUNCTION__);
return 0; return 0;
} }
...@@ -581,7 +580,7 @@ static int irport_change_speed_complete(struct irda_task *task) ...@@ -581,7 +580,7 @@ static int irport_change_speed_complete(struct irda_task *task)
{ {
struct irport_cb *self; struct irport_cb *self;
IRDA_DEBUG(1, __FUNCTION__ "()\n"); IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
self = (struct irport_cb *) task->instance; self = (struct irport_cb *) task->instance;
...@@ -638,7 +637,7 @@ int irport_hard_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -638,7 +637,7 @@ int irport_hard_xmit(struct sk_buff *skb, struct net_device *dev)
int iobase; int iobase;
s32 speed; s32 speed;
IRDA_DEBUG(1, __FUNCTION__ "()\n"); IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
ASSERT(dev != NULL, return 0;); ASSERT(dev != NULL, return 0;);
...@@ -712,7 +711,7 @@ static void irport_receive(struct irport_cb *self) ...@@ -712,7 +711,7 @@ static void irport_receive(struct irport_cb *self)
/* Make sure we don't stay here to long */ /* Make sure we don't stay here to long */
if (boguscount++ > 32) { if (boguscount++ > 32) {
IRDA_DEBUG(2,__FUNCTION__ "(), breaking!\n"); IRDA_DEBUG(2,"%s(), breaking!\n", __FUNCTION__);
break; break;
} }
} while (inb(iobase+UART_LSR) & UART_LSR_DR); } while (inb(iobase+UART_LSR) & UART_LSR_DR);
...@@ -732,7 +731,7 @@ void irport_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -732,7 +731,7 @@ void irport_interrupt(int irq, void *dev_id, struct pt_regs *regs)
int iir, lsr; int iir, lsr;
if (!dev) { if (!dev) {
WARNING(__FUNCTION__ "() irq %d for unknown device.\n", irq); WARNING("%s() irq %d for unknown device.\n", __FUNCTION__, irq);
return; return;
} }
self = (struct irport_cb *) dev->priv; self = (struct irport_cb *) dev->priv;
...@@ -746,13 +745,12 @@ void irport_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -746,13 +745,12 @@ void irport_interrupt(int irq, void *dev_id, struct pt_regs *regs)
/* Clear interrupt */ /* Clear interrupt */
lsr = inb(iobase+UART_LSR); lsr = inb(iobase+UART_LSR);
IRDA_DEBUG(4, __FUNCTION__ IRDA_DEBUG(4, "%s(), iir=%02x, lsr=%02x, iobase=%#x\n",
"(), iir=%02x, lsr=%02x, iobase=%#x\n", __FUNCTION__, iir, lsr, iobase);
iir, lsr, iobase);
switch (iir) { switch (iir) {
case UART_IIR_RLSI: case UART_IIR_RLSI:
IRDA_DEBUG(2, __FUNCTION__ "(), RLSI\n"); IRDA_DEBUG(2, "%s(), RLSI\n", __FUNCTION__);
break; break;
case UART_IIR_RDI: case UART_IIR_RDI:
/* Receive interrupt */ /* Receive interrupt */
...@@ -764,7 +762,7 @@ void irport_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -764,7 +762,7 @@ void irport_interrupt(int irq, void *dev_id, struct pt_regs *regs)
irport_write_wakeup(self); irport_write_wakeup(self);
break; break;
default: default:
IRDA_DEBUG(0, __FUNCTION__ "(), unhandled IIR=%#x\n", iir); IRDA_DEBUG(0, "%s(), unhandled IIR=%#x\n", __FUNCTION__, iir);
break; break;
} }
...@@ -800,7 +798,7 @@ int irport_net_open(struct net_device *dev) ...@@ -800,7 +798,7 @@ int irport_net_open(struct net_device *dev)
char hwname[16]; char hwname[16];
unsigned long flags; unsigned long flags;
IRDA_DEBUG(1, __FUNCTION__ "()\n"); IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
ASSERT(dev != NULL, return -1;); ASSERT(dev != NULL, return -1;);
self = (struct irport_cb *) dev->priv; self = (struct irport_cb *) dev->priv;
...@@ -809,8 +807,8 @@ int irport_net_open(struct net_device *dev) ...@@ -809,8 +807,8 @@ int irport_net_open(struct net_device *dev)
if (request_irq(self->io.irq, self->interrupt, 0, dev->name, if (request_irq(self->io.irq, self->interrupt, 0, dev->name,
(void *) dev)) { (void *) dev)) {
IRDA_DEBUG(0, __FUNCTION__ "(), unable to allocate irq=%d\n", IRDA_DEBUG(0, "%s(), unable to allocate irq=%d\n",
self->io.irq); __FUNCTION__, self->io.irq);
return -EAGAIN; return -EAGAIN;
} }
...@@ -850,7 +848,7 @@ int irport_net_close(struct net_device *dev) ...@@ -850,7 +848,7 @@ int irport_net_close(struct net_device *dev)
int iobase; int iobase;
unsigned long flags; unsigned long flags;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(dev != NULL, return -1;); ASSERT(dev != NULL, return -1;);
self = (struct irport_cb *) dev->priv; self = (struct irport_cb *) dev->priv;
...@@ -893,7 +891,7 @@ void irport_wait_until_sent(struct irport_cb *self) ...@@ -893,7 +891,7 @@ void irport_wait_until_sent(struct irport_cb *self)
/* Wait until Tx FIFO is empty */ /* Wait until Tx FIFO is empty */
while (!(inb(iobase+UART_LSR) & UART_LSR_THRE)) { while (!(inb(iobase+UART_LSR) & UART_LSR_THRE)) {
IRDA_DEBUG(2, __FUNCTION__ "(), waiting!\n"); IRDA_DEBUG(2, "%s(), waiting!\n", __FUNCTION__);
current->state = TASK_INTERRUPTIBLE; current->state = TASK_INTERRUPTIBLE;
schedule_timeout(MSECS_TO_JIFFIES(60)); schedule_timeout(MSECS_TO_JIFFIES(60));
} }
...@@ -948,7 +946,7 @@ static int irport_raw_write(struct net_device *dev, __u8 *buf, int len) ...@@ -948,7 +946,7 @@ static int irport_raw_write(struct net_device *dev, __u8 *buf, int len)
/* Tx FIFO should be empty! */ /* Tx FIFO should be empty! */
if (!(inb(iobase+UART_LSR) & UART_LSR_THRE)) { if (!(inb(iobase+UART_LSR) & UART_LSR_THRE)) {
IRDA_DEBUG( 0, __FUNCTION__ "(), failed, fifo not empty!\n"); IRDA_DEBUG( 0, "%s(), failed, fifo not empty!\n", __FUNCTION__);
return -1; return -1;
} }
...@@ -982,7 +980,7 @@ static int irport_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -982,7 +980,7 @@ static int irport_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
IRDA_DEBUG(2, __FUNCTION__ "(), %s, (cmd=0x%X)\n", dev->name, cmd); IRDA_DEBUG(2, "%s(), %s, (cmd=0x%X)\n", __FUNCTION__, dev->name, cmd);
switch (cmd) { switch (cmd) {
case SIOCSBANDWIDTH: /* Set bandwidth */ case SIOCSBANDWIDTH: /* Set bandwidth */
......
...@@ -120,9 +120,8 @@ static void __exit irtty_cleanup(void) ...@@ -120,9 +120,8 @@ static void __exit irtty_cleanup(void)
/* Unregister tty line-discipline */ /* Unregister tty line-discipline */
if ((ret = tty_register_ldisc(N_IRDA, NULL))) { if ((ret = tty_register_ldisc(N_IRDA, NULL))) {
ERROR(__FUNCTION__ ERROR("%s(), can't unregister line discipline (err = %d)\n",
"(), can't unregister line discipline (err = %d)\n", __FUNCTION__, ret);
ret);
} }
/* /*
...@@ -229,7 +228,7 @@ static int irtty_open(struct tty_struct *tty) ...@@ -229,7 +228,7 @@ static int irtty_open(struct tty_struct *tty)
self->rx_buff.data = self->rx_buff.head; self->rx_buff.data = self->rx_buff.head;
if (!(dev = dev_alloc("irda%d", &err))) { if (!(dev = dev_alloc("irda%d", &err))) {
ERROR(__FUNCTION__ "(), dev_alloc() failed!\n"); ERROR("%s(), dev_alloc() failed!\n", __FUNCTION__);
return -ENOMEM; return -ENOMEM;
} }
...@@ -248,7 +247,7 @@ static int irtty_open(struct tty_struct *tty) ...@@ -248,7 +247,7 @@ static int irtty_open(struct tty_struct *tty)
err = register_netdevice(dev); err = register_netdevice(dev);
rtnl_unlock(); rtnl_unlock();
if (err) { if (err) {
ERROR(__FUNCTION__ "(), register_netdev() failed!\n"); ERROR("%s(), register_netdev() failed!\n", __FUNCTION__);
return -1; return -1;
} }
...@@ -467,8 +466,7 @@ static int irtty_change_speed(struct irda_task *task) ...@@ -467,8 +466,7 @@ static int irtty_change_speed(struct irda_task *task)
irda_task_next_state(task, IRDA_TASK_CHILD_DONE); irda_task_next_state(task, IRDA_TASK_CHILD_DONE);
break; break;
case IRDA_TASK_CHILD_WAIT: case IRDA_TASK_CHILD_WAIT:
WARNING(__FUNCTION__ WARNING("%s(), changing speed of dongle timed out!\n", __FUNCTION__);
"(), changing speed of dongle timed out!\n");
ret = -1; ret = -1;
break; break;
case IRDA_TASK_CHILD_DONE: case IRDA_TASK_CHILD_DONE:
...@@ -479,7 +477,7 @@ static int irtty_change_speed(struct irda_task *task) ...@@ -479,7 +477,7 @@ static int irtty_change_speed(struct irda_task *task)
self->task = NULL; self->task = NULL;
break; break;
default: default:
ERROR(__FUNCTION__ "(), unknown state %d\n", task->state); ERROR("%s(), unknown state %d\n", __FUNCTION__, task->state);
irda_task_next_state(task, IRDA_TASK_DONE); irda_task_next_state(task, IRDA_TASK_DONE);
self->task = NULL; self->task = NULL;
ret = -1; ret = -1;
......
...@@ -109,7 +109,7 @@ static int mcp2120_change_speed(struct irda_task *task) ...@@ -109,7 +109,7 @@ static int mcp2120_change_speed(struct irda_task *task)
} }
break; break;
case IRDA_TASK_CHILD_WAIT: case IRDA_TASK_CHILD_WAIT:
WARNING(__FUNCTION__ "(), resetting dongle timed out!\n"); WARNING("%s(), resetting dongle timed out!\n", __FUNCTION__);
ret = -1; ret = -1;
break; break;
case IRDA_TASK_CHILD_DONE: case IRDA_TASK_CHILD_DONE:
...@@ -157,7 +157,7 @@ static int mcp2120_change_speed(struct irda_task *task) ...@@ -157,7 +157,7 @@ static int mcp2120_change_speed(struct irda_task *task)
//printk("mcp2120_change_speed irda_task_wait\n"); //printk("mcp2120_change_speed irda_task_wait\n");
break; break;
default: default:
ERROR(__FUNCTION__ "(), unknown state %d\n", task->state); ERROR("%s(), unknown state %d\n", __FUNCTION__, task->state);
irda_task_next_state(task, IRDA_TASK_DONE); irda_task_next_state(task, IRDA_TASK_DONE);
self->speed_task = NULL; self->speed_task = NULL;
ret = -1; ret = -1;
...@@ -212,7 +212,7 @@ static int mcp2120_reset(struct irda_task *task) ...@@ -212,7 +212,7 @@ static int mcp2120_reset(struct irda_task *task)
self->reset_task = NULL; self->reset_task = NULL;
break; break;
default: default:
ERROR(__FUNCTION__ "(), unknown state %d\n", task->state); ERROR("%s(), unknown state %d\n", __FUNCTION__, task->state);
irda_task_next_state(task, IRDA_TASK_DONE); irda_task_next_state(task, IRDA_TASK_DONE);
self->reset_task = NULL; self->reset_task = NULL;
ret = -1; ret = -1;
......
...@@ -161,7 +161,7 @@ int __init nsc_ircc_init(void) ...@@ -161,7 +161,7 @@ int __init nsc_ircc_init(void)
/* Probe for all the NSC chipsets we know about */ /* Probe for all the NSC chipsets we know about */
for (chip=chips; chip->name ; chip++) { for (chip=chips; chip->name ; chip++) {
IRDA_DEBUG(2, __FUNCTION__"(), Probing for %s ...\n", IRDA_DEBUG(2, "%s(), Probing for %s ...\n", __FUNCTION__,
chip->name); chip->name);
/* Try all config registers for this chip */ /* Try all config registers for this chip */
...@@ -179,8 +179,7 @@ int __init nsc_ircc_init(void) ...@@ -179,8 +179,7 @@ int __init nsc_ircc_init(void)
/* Read index register */ /* Read index register */
reg = inb(cfg_base); reg = inb(cfg_base);
if (reg == 0xff) { if (reg == 0xff) {
IRDA_DEBUG(2, __FUNCTION__ IRDA_DEBUG(2, "%s() no chip at 0x%03x\n", __FUNCTION__, cfg_base);
"() no chip at 0x%03x\n", cfg_base);
continue; continue;
} }
...@@ -188,9 +187,8 @@ int __init nsc_ircc_init(void) ...@@ -188,9 +187,8 @@ int __init nsc_ircc_init(void)
outb(chip->cid_index, cfg_base); outb(chip->cid_index, cfg_base);
id = inb(cfg_base+1); id = inb(cfg_base+1);
if ((id & chip->cid_mask) == chip->cid_value) { if ((id & chip->cid_mask) == chip->cid_value) {
IRDA_DEBUG(2, __FUNCTION__ IRDA_DEBUG(2, "%s() Found %s chip, revision=%d\n",
"() Found %s chip, revision=%d\n", __FUNCTION__, chip->name, id & ~chip->cid_mask);
chip->name, id & ~chip->cid_mask);
/* /*
* If the user supplies the base address, then * If the user supplies the base address, then
* we init the chip, if not we probe the values * we init the chip, if not we probe the values
...@@ -205,8 +203,7 @@ int __init nsc_ircc_init(void) ...@@ -205,8 +203,7 @@ int __init nsc_ircc_init(void)
ret = 0; ret = 0;
i++; i++;
} else { } else {
IRDA_DEBUG(2, __FUNCTION__ IRDA_DEBUG(2, "%s(), Wrong chip id=0x%02x\n", __FUNCTION__, id);
"(), Wrong chip id=0x%02x\n", id);
} }
} }
...@@ -247,7 +244,7 @@ static int __init nsc_ircc_open(int i, chipio_t *info) ...@@ -247,7 +244,7 @@ static int __init nsc_ircc_open(int i, chipio_t *info)
void *ret; void *ret;
int err; int err;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
MESSAGE("%s, Found chip at base=0x%03x\n", driver_name, MESSAGE("%s, Found chip at base=0x%03x\n", driver_name,
info->cfg_base); info->cfg_base);
...@@ -260,8 +257,8 @@ static int __init nsc_ircc_open(int i, chipio_t *info) ...@@ -260,8 +257,8 @@ static int __init nsc_ircc_open(int i, chipio_t *info)
/* Allocate new instance of the driver */ /* Allocate new instance of the driver */
self = kmalloc(sizeof(struct nsc_ircc_cb), GFP_KERNEL); self = kmalloc(sizeof(struct nsc_ircc_cb), GFP_KERNEL);
if (self == NULL) { if (self == NULL) {
ERROR(__FUNCTION__ "(), can't allocate memory for " ERROR("%s(), can't allocate memory for "
"control block!\n"); "control block!\n", __FUNCTION__);
return -ENOMEM; return -ENOMEM;
} }
memset(self, 0, sizeof(struct nsc_ircc_cb)); memset(self, 0, sizeof(struct nsc_ircc_cb));
...@@ -282,8 +279,8 @@ static int __init nsc_ircc_open(int i, chipio_t *info) ...@@ -282,8 +279,8 @@ static int __init nsc_ircc_open(int i, chipio_t *info)
/* Reserve the ioports that we need */ /* Reserve the ioports that we need */
ret = request_region(self->io.fir_base, self->io.fir_ext, driver_name); ret = request_region(self->io.fir_base, self->io.fir_ext, driver_name);
if (!ret) { if (!ret) {
WARNING(__FUNCTION__ "(), can't get iobase of 0x%03x\n", WARNING("%s(), can't get iobase of 0x%03x\n",
self->io.fir_base); __FUNCTION__, self->io.fir_base);
dev_self[i] = NULL; dev_self[i] = NULL;
kfree(self); kfree(self);
return -ENODEV; return -ENODEV;
...@@ -333,7 +330,7 @@ static int __init nsc_ircc_open(int i, chipio_t *info) ...@@ -333,7 +330,7 @@ static int __init nsc_ircc_open(int i, chipio_t *info)
self->tx_fifo.tail = self->tx_buff.head; self->tx_fifo.tail = self->tx_buff.head;
if (!(dev = dev_alloc("irda%d", &err))) { if (!(dev = dev_alloc("irda%d", &err))) {
ERROR(__FUNCTION__ "(), dev_alloc() failed!\n"); ERROR("%s(), dev_alloc() failed!\n", __FUNCTION__);
return -ENOMEM; return -ENOMEM;
} }
...@@ -352,7 +349,7 @@ static int __init nsc_ircc_open(int i, chipio_t *info) ...@@ -352,7 +349,7 @@ static int __init nsc_ircc_open(int i, chipio_t *info)
err = register_netdevice(dev); err = register_netdevice(dev);
rtnl_unlock(); rtnl_unlock();
if (err) { if (err) {
ERROR(__FUNCTION__ "(), register_netdev() failed!\n"); ERROR("%s(), register_netdev() failed!\n", __FUNCTION__);
return -1; return -1;
} }
MESSAGE("IrDA: Registered device %s\n", dev->name); MESSAGE("IrDA: Registered device %s\n", dev->name);
...@@ -388,7 +385,7 @@ static int __exit nsc_ircc_close(struct nsc_ircc_cb *self) ...@@ -388,7 +385,7 @@ static int __exit nsc_ircc_close(struct nsc_ircc_cb *self)
{ {
int iobase; int iobase;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
...@@ -402,8 +399,8 @@ static int __exit nsc_ircc_close(struct nsc_ircc_cb *self) ...@@ -402,8 +399,8 @@ static int __exit nsc_ircc_close(struct nsc_ircc_cb *self)
} }
/* Release the PORT that this driver is using */ /* Release the PORT that this driver is using */
IRDA_DEBUG(4, __FUNCTION__ "(), Releasing Region %03x\n", IRDA_DEBUG(4, "%s(), Releasing Region %03x\n",
self->io.fir_base); __FUNCTION__, self->io.fir_base);
release_region(self->io.fir_base, self->io.fir_ext); release_region(self->io.fir_base, self->io.fir_ext);
if (self->tx_buff.head) if (self->tx_buff.head)
...@@ -439,7 +436,7 @@ static int nsc_ircc_init_108(nsc_chip_t *chip, chipio_t *info) ...@@ -439,7 +436,7 @@ static int nsc_ircc_init_108(nsc_chip_t *chip, chipio_t *info)
case 0x2e8: outb(0x15, cfg_base+1); break; case 0x2e8: outb(0x15, cfg_base+1); break;
case 0x3f8: outb(0x16, cfg_base+1); break; case 0x3f8: outb(0x16, cfg_base+1); break;
case 0x2f8: outb(0x17, cfg_base+1); break; case 0x2f8: outb(0x17, cfg_base+1); break;
default: ERROR(__FUNCTION__ "(), invalid base_address"); default: ERROR("%s(), invalid base_address", __FUNCTION__);
} }
/* Control Signal Routing Register (CSRT) */ /* Control Signal Routing Register (CSRT) */
...@@ -451,7 +448,7 @@ static int nsc_ircc_init_108(nsc_chip_t *chip, chipio_t *info) ...@@ -451,7 +448,7 @@ static int nsc_ircc_init_108(nsc_chip_t *chip, chipio_t *info)
case 9: temp = 0x05; break; case 9: temp = 0x05; break;
case 11: temp = 0x06; break; case 11: temp = 0x06; break;
case 15: temp = 0x07; break; case 15: temp = 0x07; break;
default: ERROR(__FUNCTION__ "(), invalid irq"); default: ERROR("%s(), invalid irq", __FUNCTION__);
} }
outb(1, cfg_base); outb(1, cfg_base);
...@@ -459,7 +456,7 @@ static int nsc_ircc_init_108(nsc_chip_t *chip, chipio_t *info) ...@@ -459,7 +456,7 @@ static int nsc_ircc_init_108(nsc_chip_t *chip, chipio_t *info)
case 0: outb(0x08+temp, cfg_base+1); break; case 0: outb(0x08+temp, cfg_base+1); break;
case 1: outb(0x10+temp, cfg_base+1); break; case 1: outb(0x10+temp, cfg_base+1); break;
case 3: outb(0x18+temp, cfg_base+1); break; case 3: outb(0x18+temp, cfg_base+1); break;
default: ERROR(__FUNCTION__ "(), invalid dma"); default: ERROR("%s(), invalid dma", __FUNCTION__);
} }
outb(2, cfg_base); /* Mode Control Register (MCTL) */ outb(2, cfg_base); /* Mode Control Register (MCTL) */
...@@ -498,7 +495,7 @@ static int nsc_ircc_probe_108(nsc_chip_t *chip, chipio_t *info) ...@@ -498,7 +495,7 @@ static int nsc_ircc_probe_108(nsc_chip_t *chip, chipio_t *info)
break; break;
} }
info->sir_base = info->fir_base; info->sir_base = info->fir_base;
IRDA_DEBUG(2, __FUNCTION__ "(), probing fir_base=0x%03x\n", IRDA_DEBUG(2, "%s(), probing fir_base=0x%03x\n", __FUNCTION__,
info->fir_base); info->fir_base);
/* Read control signals routing register (CSRT) */ /* Read control signals routing register (CSRT) */
...@@ -531,7 +528,7 @@ static int nsc_ircc_probe_108(nsc_chip_t *chip, chipio_t *info) ...@@ -531,7 +528,7 @@ static int nsc_ircc_probe_108(nsc_chip_t *chip, chipio_t *info)
info->irq = 15; info->irq = 15;
break; break;
} }
IRDA_DEBUG(2, __FUNCTION__ "(), probing irq=%d\n", info->irq); IRDA_DEBUG(2, "%s(), probing irq=%d\n", __FUNCTION__, info->irq);
/* Currently we only read Rx DMA but it will also be used for Tx */ /* Currently we only read Rx DMA but it will also be used for Tx */
switch ((reg >> 3) & 0x03) { switch ((reg >> 3) & 0x03) {
...@@ -548,7 +545,7 @@ static int nsc_ircc_probe_108(nsc_chip_t *chip, chipio_t *info) ...@@ -548,7 +545,7 @@ static int nsc_ircc_probe_108(nsc_chip_t *chip, chipio_t *info)
info->dma = 3; info->dma = 3;
break; break;
} }
IRDA_DEBUG(2, __FUNCTION__ "(), probing dma=%d\n", info->dma); IRDA_DEBUG(2, "%s(), probing dma=%d\n", __FUNCTION__, info->dma);
/* Read mode control register (MCTL) */ /* Read mode control register (MCTL) */
outb(CFG_MCTL, cfg_base); outb(CFG_MCTL, cfg_base);
...@@ -694,8 +691,8 @@ static int nsc_ircc_setup(chipio_t *info) ...@@ -694,8 +691,8 @@ static int nsc_ircc_setup(chipio_t *info)
switch_bank(iobase, BANK3); switch_bank(iobase, BANK3);
version = inb(iobase+MID); version = inb(iobase+MID);
IRDA_DEBUG(2, __FUNCTION__ "() Driver %s Found chip version %02x\n", IRDA_DEBUG(2, "%s() Driver %s Found chip version %02x\n",
driver_name, version); __FUNCTION__, driver_name, version);
/* Should be 0x2? */ /* Should be 0x2? */
if (0x20 != (version & 0xf0)) { if (0x20 != (version & 0xf0)) {
...@@ -797,39 +794,39 @@ static void nsc_ircc_init_dongle_interface (int iobase, int dongle_id) ...@@ -797,39 +794,39 @@ static void nsc_ircc_init_dongle_interface (int iobase, int dongle_id)
switch (dongle_id) { switch (dongle_id) {
case 0x00: /* same as */ case 0x00: /* same as */
case 0x01: /* Differential serial interface */ case 0x01: /* Differential serial interface */
IRDA_DEBUG(0, __FUNCTION__ "(), %s not defined by irda yet\n", IRDA_DEBUG(0, "%s(), %s not defined by irda yet\n",
dongle_types[dongle_id]); __FUNCTION__, dongle_types[dongle_id]);
break; break;
case 0x02: /* same as */ case 0x02: /* same as */
case 0x03: /* Reserved */ case 0x03: /* Reserved */
IRDA_DEBUG(0, __FUNCTION__ "(), %s not defined by irda yet\n", IRDA_DEBUG(0, "%s(), %s not defined by irda yet\n",
dongle_types[dongle_id]); __FUNCTION__, dongle_types[dongle_id]);
break; break;
case 0x04: /* Sharp RY5HD01 */ case 0x04: /* Sharp RY5HD01 */
break; break;
case 0x05: /* Reserved, but this is what the Thinkpad reports */ case 0x05: /* Reserved, but this is what the Thinkpad reports */
IRDA_DEBUG(0, __FUNCTION__ "(), %s not defined by irda yet\n", IRDA_DEBUG(0, "%s(), %s not defined by irda yet\n",
dongle_types[dongle_id]); __FUNCTION__, dongle_types[dongle_id]);
break; break;
case 0x06: /* Single-ended serial interface */ case 0x06: /* Single-ended serial interface */
IRDA_DEBUG(0, __FUNCTION__ "(), %s not defined by irda yet\n", IRDA_DEBUG(0, "%s(), %s not defined by irda yet\n",
dongle_types[dongle_id]); __FUNCTION__, dongle_types[dongle_id]);
break; break;
case 0x07: /* Consumer-IR only */ case 0x07: /* Consumer-IR only */
IRDA_DEBUG(0, __FUNCTION__ "(), %s is not for IrDA mode\n", IRDA_DEBUG(0, "%s(), %s is not for IrDA mode\n",
dongle_types[dongle_id]); __FUNCTION__, dongle_types[dongle_id]);
break; break;
case 0x08: /* HP HSDL-2300, HP HSDL-3600/HSDL-3610 */ case 0x08: /* HP HSDL-2300, HP HSDL-3600/HSDL-3610 */
IRDA_DEBUG(0, __FUNCTION__ "(), %s\n", IRDA_DEBUG(0, "%s(), %s\n",
dongle_types[dongle_id]); __FUNCTION__, dongle_types[dongle_id]);
break; break;
case 0x09: /* IBM31T1100 or Temic TFDS6000/TFDS6500 */ case 0x09: /* IBM31T1100 or Temic TFDS6000/TFDS6500 */
outb(0x28, iobase+7); /* Set irsl[0-2] as output */ outb(0x28, iobase+7); /* Set irsl[0-2] as output */
break; break;
case 0x0A: /* same as */ case 0x0A: /* same as */
case 0x0B: /* Reserved */ case 0x0B: /* Reserved */
IRDA_DEBUG(0, __FUNCTION__ "(), %s not defined by irda yet\n", IRDA_DEBUG(0, "%s(), %s not defined by irda yet\n",
dongle_types[dongle_id]); __FUNCTION__, dongle_types[dongle_id]);
break; break;
case 0x0C: /* same as */ case 0x0C: /* same as */
case 0x0D: /* HP HSDL-1100/HSDL-2100 */ case 0x0D: /* HP HSDL-1100/HSDL-2100 */
...@@ -843,15 +840,15 @@ static void nsc_ircc_init_dongle_interface (int iobase, int dongle_id) ...@@ -843,15 +840,15 @@ static void nsc_ircc_init_dongle_interface (int iobase, int dongle_id)
outb(0x28, iobase+7); /* Set irsl[0-2] as output */ outb(0x28, iobase+7); /* Set irsl[0-2] as output */
break; break;
case 0x0F: /* No dongle connected */ case 0x0F: /* No dongle connected */
IRDA_DEBUG(0, __FUNCTION__ "(), %s\n", IRDA_DEBUG(0, "%s(), %s\n",
dongle_types[dongle_id]); __FUNCTION__, dongle_types[dongle_id]);
switch_bank(iobase, BANK0); switch_bank(iobase, BANK0);
outb(0x62, iobase+MCR); outb(0x62, iobase+MCR);
break; break;
default: default:
IRDA_DEBUG(0, __FUNCTION__ "(), invalid dongle_id %#x", IRDA_DEBUG(0, "%s(), invalid dongle_id %#x",
dongle_id); __FUNCTION__, dongle_id);
} }
/* IRCFG1: IRSL1 and 2 are set to IrDA mode */ /* IRCFG1: IRSL1 and 2 are set to IrDA mode */
...@@ -882,31 +879,31 @@ static void nsc_ircc_change_dongle_speed(int iobase, int speed, int dongle_id) ...@@ -882,31 +879,31 @@ static void nsc_ircc_change_dongle_speed(int iobase, int speed, int dongle_id)
switch (dongle_id) { switch (dongle_id) {
case 0x00: /* same as */ case 0x00: /* same as */
case 0x01: /* Differential serial interface */ case 0x01: /* Differential serial interface */
IRDA_DEBUG(0, __FUNCTION__ "(), %s not defined by irda yet\n", IRDA_DEBUG(0, "%s(), %s not defined by irda yet\n",
dongle_types[dongle_id]); __FUNCTION__, dongle_types[dongle_id]);
break; break;
case 0x02: /* same as */ case 0x02: /* same as */
case 0x03: /* Reserved */ case 0x03: /* Reserved */
IRDA_DEBUG(0, __FUNCTION__ "(), %s not defined by irda yet\n", IRDA_DEBUG(0, "%s(), %s not defined by irda yet\n",
dongle_types[dongle_id]); __FUNCTION__, dongle_types[dongle_id]);
break; break;
case 0x04: /* Sharp RY5HD01 */ case 0x04: /* Sharp RY5HD01 */
break; break;
case 0x05: /* Reserved */ case 0x05: /* Reserved */
IRDA_DEBUG(0, __FUNCTION__ "(), %s not defined by irda yet\n", IRDA_DEBUG(0, "%s(), %s not defined by irda yet\n",
dongle_types[dongle_id]); __FUNCTION__, dongle_types[dongle_id]);
break; break;
case 0x06: /* Single-ended serial interface */ case 0x06: /* Single-ended serial interface */
IRDA_DEBUG(0, __FUNCTION__ "(), %s not defined by irda yet\n", IRDA_DEBUG(0, "%s(), %s not defined by irda yet\n",
dongle_types[dongle_id]); __FUNCTION__, dongle_types[dongle_id]);
break; break;
case 0x07: /* Consumer-IR only */ case 0x07: /* Consumer-IR only */
IRDA_DEBUG(0, __FUNCTION__ "(), %s is not for IrDA mode\n", IRDA_DEBUG(0, "%s(), %s is not for IrDA mode\n",
dongle_types[dongle_id]); __FUNCTION__, dongle_types[dongle_id]);
break; break;
case 0x08: /* HP HSDL-2300, HP HSDL-3600/HSDL-3610 */ case 0x08: /* HP HSDL-2300, HP HSDL-3600/HSDL-3610 */
IRDA_DEBUG(0, __FUNCTION__ "(), %s\n", IRDA_DEBUG(0, "%s(), %s\n",
dongle_types[dongle_id]); __FUNCTION__, dongle_types[dongle_id]);
outb(0x00, iobase+4); outb(0x00, iobase+4);
if (speed > 115200) if (speed > 115200)
outb(0x01, iobase+4); outb(0x01, iobase+4);
...@@ -1536,8 +1533,8 @@ static int nsc_ircc_dma_receive_complete(struct nsc_ircc_cb *self, int iobase) ...@@ -1536,8 +1533,8 @@ static int nsc_ircc_dma_receive_complete(struct nsc_ircc_cb *self, int iobase)
skb = dev_alloc_skb(len+1); skb = dev_alloc_skb(len+1);
if (skb == NULL) { if (skb == NULL) {
WARNING(__FUNCTION__ "(), memory squeeze, " WARNING("%s(), memory squeeze, "
"dropping frame.\n"); "dropping frame.\n", __FUNCTION__);
self->stats.rx_dropped++; self->stats.rx_dropped++;
/* Restore bank register */ /* Restore bank register */
......
...@@ -949,14 +949,14 @@ static void ircc_dma_receive_complete(struct ircc_cb *self, int iobase) ...@@ -949,14 +949,14 @@ static void ircc_dma_receive_complete(struct ircc_cb *self, int iobase)
len -= 4; len -= 4;
if ((len < 2) || (len > 2050)) { if ((len < 2) || (len > 2050)) {
WARNING(__FUNCTION__ "(), bogus len=%d\n", len); WARNING("%s(), bogus len=%d\n", __FUNCTION__, len);
return; return;
} }
IRDA_DEBUG(2, __FUNCTION__ ": msgcnt = %d, len=%d\n", msgcnt, len); IRDA_DEBUG(2, __FUNCTION__ ": msgcnt = %d, len=%d\n", msgcnt, len);
skb = dev_alloc_skb(len+1); skb = dev_alloc_skb(len+1);
if (!skb) { if (!skb) {
WARNING(__FUNCTION__ "(), memory squeeze, dropping frame.\n"); WARNING("%s(), memory squeeze, dropping frame.\n", __FUNCTION__);
return; return;
} }
/* Make sure IP header gets aligned */ /* Make sure IP header gets aligned */
...@@ -1086,7 +1086,7 @@ static int ircc_net_open(struct net_device *dev) ...@@ -1086,7 +1086,7 @@ static int ircc_net_open(struct net_device *dev)
if (request_dma(self->io->dma, dev->name)) { if (request_dma(self->io->dma, dev->name)) {
irport_net_close(dev); irport_net_close(dev);
WARNING(__FUNCTION__ "(), unable to allocate DMA=%d\n", self->io->dma); WARNING("%s(), unable to allocate DMA=%d\n", __FUNCTION__, self->io->dma);
return -EAGAIN; return -EAGAIN;
} }
...@@ -1107,7 +1107,7 @@ static int ircc_net_close(struct net_device *dev) ...@@ -1107,7 +1107,7 @@ static int ircc_net_close(struct net_device *dev)
struct ircc_cb *self; struct ircc_cb *self;
int iobase; int iobase;
IRDA_DEBUG(0, __FUNCTION__ "\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
ASSERT(dev != NULL, return -1;); ASSERT(dev != NULL, return -1;);
irport = (struct irport_cb *) dev->priv; irport = (struct irport_cb *) dev->priv;
......
...@@ -161,7 +161,7 @@ static int tekram_change_speed(struct irda_task *task) ...@@ -161,7 +161,7 @@ static int tekram_change_speed(struct irda_task *task)
irda_task_next_state(task, IRDA_TASK_CHILD_DONE); irda_task_next_state(task, IRDA_TASK_CHILD_DONE);
break; break;
case IRDA_TASK_CHILD_WAIT: case IRDA_TASK_CHILD_WAIT:
WARNING(__FUNCTION__ "(), resetting dongle timed out!\n"); WARNING("%s(), resetting dongle timed out!\n", __FUNCTION__);
ret = -1; ret = -1;
break; break;
case IRDA_TASK_CHILD_DONE: case IRDA_TASK_CHILD_DONE:
...@@ -187,7 +187,7 @@ static int tekram_change_speed(struct irda_task *task) ...@@ -187,7 +187,7 @@ static int tekram_change_speed(struct irda_task *task)
self->speed_task = NULL; self->speed_task = NULL;
break; break;
default: default:
ERROR(__FUNCTION__ "(), unknown state %d\n", task->state); ERROR("%s(), unknown state %d\n", __FUNCTION__, task->state);
irda_task_next_state(task, IRDA_TASK_DONE); irda_task_next_state(task, IRDA_TASK_DONE);
self->speed_task = NULL; self->speed_task = NULL;
ret = -1; ret = -1;
...@@ -255,7 +255,7 @@ int tekram_reset(struct irda_task *task) ...@@ -255,7 +255,7 @@ int tekram_reset(struct irda_task *task)
self->reset_task = NULL; self->reset_task = NULL;
break; break;
default: default:
ERROR(__FUNCTION__ "(), unknown state %d\n", task->state); ERROR("%s(), unknown state %d\n", __FUNCTION__, task->state);
irda_task_next_state(task, IRDA_TASK_DONE); irda_task_next_state(task, IRDA_TASK_DONE);
self->reset_task = NULL; self->reset_task = NULL;
ret = -1; ret = -1;
......
...@@ -421,8 +421,8 @@ toshoboe_interrupt (int irq, void *dev_id, struct pt_regs *regs) ...@@ -421,8 +421,8 @@ toshoboe_interrupt (int irq, void *dev_id, struct pt_regs *regs)
} }
else else
{ {
printk (KERN_INFO __FUNCTION__ printk (KERN_INFO
"(), memory squeeze, dropping frame.\n"); "%s(), memory squeeze, dropping frame.\n", __FUNCTION__);
} }
self->taskfile->recv[self->rxs].control = 0x83; self->taskfile->recv[self->rxs].control = 0x83;
...@@ -824,7 +824,7 @@ toshoboe_probe (struct pci_dev *pci_dev, const struct pci_device_id *pdid) ...@@ -824,7 +824,7 @@ toshoboe_probe (struct pci_dev *pci_dev, const struct pci_device_id *pdid)
if (!(dev = dev_alloc("irda%d", &err))) { if (!(dev = dev_alloc("irda%d", &err))) {
ERROR(__FUNCTION__ "(), dev_alloc() failed!\n"); ERROR("%s(), dev_alloc() failed!\n", __FUNCTION__);
err = -ENOMEM; err = -ENOMEM;
goto freebufs; goto freebufs;
} }
...@@ -843,7 +843,7 @@ toshoboe_probe (struct pci_dev *pci_dev, const struct pci_device_id *pdid) ...@@ -843,7 +843,7 @@ toshoboe_probe (struct pci_dev *pci_dev, const struct pci_device_id *pdid)
err = register_netdevice(dev); err = register_netdevice(dev);
rtnl_unlock(); rtnl_unlock();
if (err) { if (err) {
ERROR(__FUNCTION__ "(), register_netdev() failed!\n"); ERROR("%s(), register_netdev() failed!\n", __FUNCTION__);
/* XXX there is not freeing for dev? */ /* XXX there is not freeing for dev? */
goto freebufs; goto freebufs;
} }
......
...@@ -237,7 +237,7 @@ int w83977af_open(int i, unsigned int iobase, unsigned int irq, ...@@ -237,7 +237,7 @@ int w83977af_open(int i, unsigned int iobase, unsigned int irq,
self->rx_buff.data = self->rx_buff.head; self->rx_buff.data = self->rx_buff.head;
if (!(dev = dev_alloc("irda%d", &err))) { if (!(dev = dev_alloc("irda%d", &err))) {
ERROR(__FUNCTION__ "(), dev_alloc() failed!\n"); ERROR("%s(), dev_alloc() failed!\n", __FUNCTION__);
return -ENOMEM; return -ENOMEM;
} }
dev->priv = (void *) self; dev->priv = (void *) self;
...@@ -255,7 +255,7 @@ int w83977af_open(int i, unsigned int iobase, unsigned int irq, ...@@ -255,7 +255,7 @@ int w83977af_open(int i, unsigned int iobase, unsigned int irq,
err = register_netdevice(dev); err = register_netdevice(dev);
rtnl_unlock(); rtnl_unlock();
if (err) { if (err) {
ERROR(__FUNCTION__ "(), register_netdevice() failed!\n"); ERROR("%s(), register_netdevice() failed!\n", __FUNCTION__);
return -1; return -1;
} }
MESSAGE("IrDA: Registered device %s\n", dev->name); MESSAGE("IrDA: Registered device %s\n", dev->name);
...@@ -891,8 +891,8 @@ int w83977af_dma_receive_complete(struct w83977af_ir *self) ...@@ -891,8 +891,8 @@ int w83977af_dma_receive_complete(struct w83977af_ir *self)
skb = dev_alloc_skb(len+1); skb = dev_alloc_skb(len+1);
if (skb == NULL) { if (skb == NULL) {
printk(KERN_INFO __FUNCTION__ printk(KERN_INFO
"(), memory squeeze, dropping frame.\n"); "%s(), memory squeeze, dropping frame.\n", __FUNCTION__);
/* Restore set register */ /* Restore set register */
outb(set, iobase+SSR); outb(set, iobase+SSR);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment