Commit f34544db authored by Jean Tourrilhes's avatar Jean Tourrilhes Committed by Jeff Garzik

More __FUNCTION__ cleanups for IrDA

parent c28bd8af
......@@ -165,7 +165,7 @@ static int actisys_change_speed(struct irda_task *task)
int ret = 0;
int i = 0;
IRDA_DEBUG(4, __FUNCTION__ "(), speed=%d (was %d)\n", speed,
IRDA_DEBUG(4, "%s(), speed=%d (was %d)\n", __FUNCTION__, speed,
self->speed);
/* Go to a known state by reseting the dongle */
......
This diff is collapsed.
......@@ -356,7 +356,7 @@ static void __irtty_change_speed(struct irtty_cb *self, __u32 speed)
cflag &= ~CBAUD;
IRDA_DEBUG(2, __FUNCTION__ "(), Setting speed to %d\n", speed);
IRDA_DEBUG(2, "%s(), Setting speed to %d\n", __FUNCTION__, speed);
switch (speed) {
case 1200:
......@@ -406,7 +406,7 @@ static int irtty_change_speed(struct irda_task *task)
__u32 speed = (__u32) task->param;
int ret = 0;
IRDA_DEBUG(2, __FUNCTION__ "(), <%ld>\n", jiffies);
IRDA_DEBUG(2, "%s(), <%ld>\n", __FUNCTION__, jiffies);
self = (struct irtty_cb *) task->instance;
ASSERT(self != NULL, return -1;);
......@@ -416,7 +416,7 @@ static int irtty_change_speed(struct irda_task *task)
/* Check if busy */
if (self->task && self->task != task) {
IRDA_DEBUG(0, __FUNCTION__ "(), busy!\n");
IRDA_DEBUG(0, "%s(), busy!\n", __FUNCTION__);
spin_unlock_irqrestore(&self->lock, flags);
return MSECS_TO_JIFFIES(10);
} else
......@@ -571,7 +571,7 @@ static void irtty_receive_buf(struct tty_struct *tty, const unsigned char *cp,
struct irtty_cb *self = (struct irtty_cb *) tty->disc_data;
if (!self || !self->netdev) {
IRDA_DEBUG(0, __FUNCTION__ "(), not ready yet!\n");
IRDA_DEBUG(0, "%s(), not ready yet!\n", __FUNCTION__);
return;
}
......@@ -621,7 +621,7 @@ static int irtty_change_speed_complete(struct irda_task *task)
{
struct irtty_cb *self;
IRDA_DEBUG(2, __FUNCTION__ "()\n");
IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
self = (struct irtty_cb *) task->instance;
......@@ -707,7 +707,7 @@ static int irtty_hard_xmit(struct sk_buff *skb, struct net_device *dev)
*/
static int irtty_receive_room(struct tty_struct *tty)
{
IRDA_DEBUG(0, __FUNCTION__ "()\n");
IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
return 65536; /* We can handle an infinite amount of data. :-) */
}
......@@ -749,7 +749,7 @@ static void irtty_write_wakeup(struct tty_struct *tty)
* Now serial buffer is almost free & we can start
* transmission of another packet
*/
IRDA_DEBUG(5, __FUNCTION__ "(), finished with frame!\n");
IRDA_DEBUG(5, "%s(), finished with frame!\n", __FUNCTION__);
self->stats.tx_packets++;
......@@ -759,7 +759,7 @@ static void irtty_write_wakeup(struct tty_struct *tty)
spin_unlock_irqrestore(&self->lock, flags);
if (self->new_speed) {
IRDA_DEBUG(5, __FUNCTION__ "(), Changing speed!\n");
IRDA_DEBUG(5, "%s(), Changing speed!\n", __FUNCTION__);
irda_task_execute(self, irtty_change_speed,
irtty_change_speed_complete,
NULL, (void *) self->new_speed);
......@@ -824,7 +824,7 @@ static int irtty_set_dtr_rts(struct net_device *dev, int dtr, int rts)
/* This is probably unsafe, but currently under discussion - Jean II */
if (tty->driver.ioctl(tty, NULL, TIOCMSET, (unsigned long) &arg)) {
IRDA_DEBUG(2, __FUNCTION__ "(), error doing ioctl!\n");
IRDA_DEBUG(2, "%s(), error doing ioctl!\n", __FUNCTION__);
}
set_fs(fs);
......@@ -850,7 +850,7 @@ int irtty_set_mode(struct net_device *dev, int mode)
ASSERT(self != NULL, return -1;);
IRDA_DEBUG(2, __FUNCTION__ "(), mode=%s\n", infrared_mode[mode]);
IRDA_DEBUG(2, "%s(), mode=%s\n", __FUNCTION__, infrared_mode[mode]);
/* Protect access to self->rx_buff - Jean II */
spin_lock_irqsave(&self->lock, flags);
......@@ -948,7 +948,7 @@ static int irtty_net_open(struct net_device *dev)
ASSERT(self != NULL, return -1;);
ASSERT(self->magic == IRTTY_MAGIC, return -1;);
IRDA_DEBUG(0, __FUNCTION__ "()\n");
IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
/* Ready to play! */
netif_start_queue(dev);
......@@ -1015,7 +1015,7 @@ static int irtty_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
ASSERT(self != NULL, return -1;);
ASSERT(self->magic == IRTTY_MAGIC, return -1;);
IRDA_DEBUG(3, __FUNCTION__ "(), %s, (cmd=0x%X)\n", dev->name, cmd);
IRDA_DEBUG(3, "%s(), %s, (cmd=0x%X)\n", __FUNCTION__, dev->name, cmd);
/* Locking :
* irda_device_dongle_init() can't be locked.
......
......@@ -921,8 +921,8 @@ static void nsc_ircc_change_dongle_speed(int iobase, int speed, int dongle_id)
break;
case 0x0A: /* same as */
case 0x0B: /* Reserved */
IRDA_DEBUG(0, __FUNCTION__ "(), %s not defined by irda yet\n",
dongle_types[dongle_id]);
IRDA_DEBUG(0, "%s(), %s not defined by irda yet\n",
__FUNCTION__, dongle_types[dongle_id]);
break;
case 0x0C: /* same as */
case 0x0D: /* HP HSDL-1100/HSDL-2100 */
......@@ -930,14 +930,14 @@ static void nsc_ircc_change_dongle_speed(int iobase, int speed, int dongle_id)
case 0x0E: /* Supports SIR Mode only */
break;
case 0x0F: /* No dongle connected */
IRDA_DEBUG(0, __FUNCTION__ "(), %s is not for IrDA mode\n",
dongle_types[dongle_id]);
IRDA_DEBUG(0, "%s(), %s is not for IrDA mode\n",
__FUNCTION__, dongle_types[dongle_id]);
switch_bank(iobase, BANK0);
outb(0x62, iobase+MCR);
break;
default:
IRDA_DEBUG(0, __FUNCTION__ "(), invalid data_rate\n");
IRDA_DEBUG(0, "%s(), invalid data_rate\n", __FUNCTION__);
}
/* Restore bank register */
outb(bank, iobase+BSR);
......@@ -958,7 +958,7 @@ static __u8 nsc_ircc_change_speed(struct nsc_ircc_cb *self, __u32 speed)
__u8 bank;
__u8 ier; /* Interrupt enable register */
IRDA_DEBUG(2, __FUNCTION__ "(), speed=%d\n", speed);
IRDA_DEBUG(2, "%s(), speed=%d\n", __FUNCTION__, speed);
ASSERT(self != NULL, return 0;);
......@@ -991,20 +991,20 @@ static __u8 nsc_ircc_change_speed(struct nsc_ircc_cb *self, __u32 speed)
outb(inb(iobase+4) | 0x04, iobase+4);
mcr = MCR_MIR;
IRDA_DEBUG(0, __FUNCTION__ "(), handling baud of 576000\n");
IRDA_DEBUG(0, "%s(), handling baud of 576000\n", __FUNCTION__);
break;
case 1152000:
mcr = MCR_MIR;
IRDA_DEBUG(0, __FUNCTION__ "(), handling baud of 1152000\n");
IRDA_DEBUG(0, "%s(), handling baud of 1152000\n", __FUNCTION__);
break;
case 4000000:
mcr = MCR_FIR;
IRDA_DEBUG(0, __FUNCTION__ "(), handling baud of 4000000\n");
IRDA_DEBUG(0, "%s(), handling baud of 4000000\n", __FUNCTION__);
break;
default:
mcr = MCR_FIR;
IRDA_DEBUG(0, __FUNCTION__ "(), unknown baud rate of %d\n",
speed);
IRDA_DEBUG(0, "%s(), unknown baud rate of %d\n",
__FUNCTION__, speed);
break;
}
......@@ -1305,15 +1305,15 @@ static int nsc_ircc_pio_write(int iobase, __u8 *buf, int len, int fifo_size)
int actual = 0;
__u8 bank;
IRDA_DEBUG(4, __FUNCTION__ "()\n");
IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
/* Save current bank */
bank = inb(iobase+BSR);
switch_bank(iobase, BANK0);
if (!(inb_p(iobase+LSR) & LSR_TXEMP)) {
IRDA_DEBUG(4, __FUNCTION__
"(), warning, FIFO not empty yet!\n");
IRDA_DEBUG(4, "%s(), warning, FIFO not empty yet!\n",
__FUNCTION__);
/* FIFO may still be filled to the Tx interrupt threshold */
fifo_size -= 17;
......@@ -1325,8 +1325,8 @@ static int nsc_ircc_pio_write(int iobase, __u8 *buf, int len, int fifo_size)
outb(buf[actual++], iobase+TXD);
}
IRDA_DEBUG(4, __FUNCTION__ "(), fifo_size %d ; %d sent of %d\n",
fifo_size, actual, len);
IRDA_DEBUG(4, "%s(), fifo_size %d ; %d sent of %d\n",
__FUNCTION__, fifo_size, actual, len);
/* Restore bank */
outb(bank, iobase+BSR);
......@@ -1347,7 +1347,7 @@ static int nsc_ircc_dma_xmit_complete(struct nsc_ircc_cb *self)
__u8 bank;
int ret = TRUE;
IRDA_DEBUG(2, __FUNCTION__ "()\n");
IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
iobase = self->io.fir_base;
......@@ -1478,7 +1478,7 @@ static int nsc_ircc_dma_receive_complete(struct nsc_ircc_cb *self, int iobase)
len = inb(iobase+RFLFL) | ((inb(iobase+RFLFH) & 0x1f) << 8);
if (st_fifo->tail >= MAX_RX_WINDOW) {
IRDA_DEBUG(0, __FUNCTION__ "(), window is full!\n");
IRDA_DEBUG(0, "%s(), window is full!\n", __FUNCTION__);
continue;
}
......@@ -1671,7 +1671,7 @@ static void nsc_ircc_sir_interrupt(struct nsc_ircc_cb *self, int eir)
* Need to be after self->io.direction to avoid race with
* nsc_ircc_hard_xmit_sir() - Jean II */
if (self->new_speed) {
IRDA_DEBUG(2, __FUNCTION__ "(), Changing speed!\n");
IRDA_DEBUG(2, "%s(), Changing speed!\n", __FUNCTION__);
self->ier = nsc_ircc_change_speed(self,
self->new_speed);
self->new_speed = 0;
......@@ -1755,8 +1755,9 @@ static void nsc_ircc_fir_interrupt(struct nsc_ircc_cb *self, int iobase,
nsc_ircc_dma_receive(self);
self->ier = IER_SFIF_IE;
} else
WARNING(__FUNCTION__ "(), potential "
"Tx queue lockup !\n");
WARNING("%s(), potential "
"Tx queue lockup !\n",
__FUNCTION__);
}
} else {
/* Not finished yet, so interrupt on DMA again */
......@@ -1863,7 +1864,7 @@ static int nsc_ircc_is_receiving(struct nsc_ircc_cb *self)
*/
static int nsc_ircc_net_init(struct net_device *dev)
{
IRDA_DEBUG(4, __FUNCTION__ "()\n");
IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
/* Setup to be a normal IrDA network device driver */
irda_device_setup(dev);
......@@ -1886,7 +1887,7 @@ static int nsc_ircc_net_open(struct net_device *dev)
char hwname[32];
__u8 bank;
IRDA_DEBUG(4, __FUNCTION__ "()\n");
IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(dev != NULL, return -1;);
self = (struct nsc_ircc_cb *) dev->priv;
......@@ -1950,7 +1951,7 @@ static int nsc_ircc_net_close(struct net_device *dev)
int iobase;
__u8 bank;
IRDA_DEBUG(4, __FUNCTION__ "()\n");
IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(dev != NULL, return -1;);
......@@ -2006,7 +2007,7 @@ static int nsc_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
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) {
case SIOCSBANDWIDTH: /* Set bandwidth */
......
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