Commit fb4cab96 authored by Jean Tourrilhes's avatar Jean Tourrilhes Committed by Linus Torvalds

More IrDA __FUNCTION__ cleanups

(contributed by Philipp Matthias Hahn)

IrDA should build now with debug enabled, too.
parent 37f852df
...@@ -106,7 +106,7 @@ void __exit act200l_cleanup(void) ...@@ -106,7 +106,7 @@ void __exit act200l_cleanup(void)
static void act200l_open(dongle_t *self, struct qos_info *qos) static void act200l_open(dongle_t *self, struct qos_info *qos)
{ {
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
/* Power on the dongle */ /* Power on the dongle */
self->set_dtr_rts(self->dev, TRUE, TRUE); self->set_dtr_rts(self->dev, TRUE, TRUE);
...@@ -120,7 +120,7 @@ static void act200l_open(dongle_t *self, struct qos_info *qos) ...@@ -120,7 +120,7 @@ static void act200l_open(dongle_t *self, struct qos_info *qos)
static void act200l_close(dongle_t *self) static void act200l_close(dongle_t *self)
{ {
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
/* Power off the dongle */ /* Power off the dongle */
self->set_dtr_rts(self->dev, FALSE, FALSE); self->set_dtr_rts(self->dev, FALSE, FALSE);
...@@ -141,7 +141,7 @@ static int act200l_change_speed(struct irda_task *task) ...@@ -141,7 +141,7 @@ static int act200l_change_speed(struct irda_task *task)
__u8 control[3]; __u8 control[3];
int ret = 0; int ret = 0;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
self->speed_task = task; self->speed_task = task;
...@@ -233,7 +233,7 @@ static int act200l_reset(struct irda_task *task) ...@@ -233,7 +233,7 @@ static int act200l_reset(struct irda_task *task)
}; };
int ret = 0; int ret = 0;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
self->reset_task = task; self->reset_task = task;
......
...@@ -864,7 +864,7 @@ static void ali_ircc_sir_receive(struct ali_ircc_cb *self) ...@@ -864,7 +864,7 @@ static void ali_ircc_sir_receive(struct ali_ircc_cb *self)
} }
} while (inb(iobase+UART_LSR) & UART_LSR_DR); } while (inb(iobase+UART_LSR) & UART_LSR_DR);
IRDA_DEBUG(2, __FUNCTION__ "(), ----------------- End ------------------\n"); IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ );
} }
/* /*
...@@ -881,7 +881,7 @@ static void ali_ircc_sir_write_wakeup(struct ali_ircc_cb *self) ...@@ -881,7 +881,7 @@ static void ali_ircc_sir_write_wakeup(struct ali_ircc_cb *self)
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
IRDA_DEBUG(2, __FUNCTION__ "(), ---------------- Start ----------------\n"); IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__ );
iobase = self->io.sir_base; iobase = self->io.sir_base;
...@@ -900,16 +900,16 @@ static void ali_ircc_sir_write_wakeup(struct ali_ircc_cb *self) ...@@ -900,16 +900,16 @@ static void ali_ircc_sir_write_wakeup(struct ali_ircc_cb *self)
{ {
/* We must wait until all data are gone */ /* We must wait until all data are gone */
while(!(inb(iobase+UART_LSR) & UART_LSR_TEMT)) while(!(inb(iobase+UART_LSR) & UART_LSR_TEMT))
IRDA_DEBUG(1, __FUNCTION__ "(), UART_LSR_THRE\n"); IRDA_DEBUG(1, "%s(), UART_LSR_THRE\n", __FUNCTION__ );
IRDA_DEBUG(1, __FUNCTION__ "(), Changing speed! self->new_speed = %d\n", self->new_speed); IRDA_DEBUG(1, "%s(), Changing speed! self->new_speed = %d\n", __FUNCTION__ , self->new_speed);
ali_ircc_change_speed(self, self->new_speed); ali_ircc_change_speed(self, self->new_speed);
self->new_speed = 0; self->new_speed = 0;
// benjamin 2000/11/10 06:32PM // benjamin 2000/11/10 06:32PM
if (self->io.speed > 115200) if (self->io.speed > 115200)
{ {
IRDA_DEBUG(2, __FUNCTION__ "(), ali_ircc_change_speed from UART_LSR_TEMT \n"); IRDA_DEBUG(2, "%s(), ali_ircc_change_speed from UART_LSR_TEMT \n", __FUNCTION__ );
self->ier = IER_EOM; self->ier = IER_EOM;
// SetCOMInterrupts(self, TRUE); // SetCOMInterrupts(self, TRUE);
...@@ -927,7 +927,7 @@ static void ali_ircc_sir_write_wakeup(struct ali_ircc_cb *self) ...@@ -927,7 +927,7 @@ static void ali_ircc_sir_write_wakeup(struct ali_ircc_cb *self)
outb(UART_IER_RDI, iobase+UART_IER); outb(UART_IER_RDI, iobase+UART_IER);
} }
IRDA_DEBUG(2, __FUNCTION__ "(), ----------------- End ------------------\n"); IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ );
} }
static void ali_ircc_change_speed(struct ali_ircc_cb *self, __u32 baud) static void ali_ircc_change_speed(struct ali_ircc_cb *self, __u32 baud)
...@@ -935,9 +935,9 @@ static void ali_ircc_change_speed(struct ali_ircc_cb *self, __u32 baud) ...@@ -935,9 +935,9 @@ static void ali_ircc_change_speed(struct ali_ircc_cb *self, __u32 baud)
struct net_device *dev = self->netdev; struct net_device *dev = self->netdev;
int iobase; int iobase;
IRDA_DEBUG(1, __FUNCTION__ "(), ---------------- Start ----------------\n"); IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __FUNCTION__ );
IRDA_DEBUG(2, __FUNCTION__ "(), setting speed = %d \n", baud); IRDA_DEBUG(2, "%s(), setting speed = %d \n", __FUNCTION__ , baud);
/* This function *must* be called with irq off and spin-lock. /* This function *must* be called with irq off and spin-lock.
* - Jean II */ * - Jean II */
...@@ -976,7 +976,7 @@ static void ali_ircc_change_speed(struct ali_ircc_cb *self, __u32 baud) ...@@ -976,7 +976,7 @@ static void ali_ircc_change_speed(struct ali_ircc_cb *self, __u32 baud)
netif_wake_queue(self->netdev); netif_wake_queue(self->netdev);
IRDA_DEBUG(2, __FUNCTION__ "(), ----------------- End ------------------\n"); IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ );
} }
static void ali_ircc_fir_change_speed(struct ali_ircc_cb *priv, __u32 baud) static void ali_ircc_fir_change_speed(struct ali_ircc_cb *priv, __u32 baud)
...@@ -986,14 +986,14 @@ static void ali_ircc_fir_change_speed(struct ali_ircc_cb *priv, __u32 baud) ...@@ -986,14 +986,14 @@ static void ali_ircc_fir_change_speed(struct ali_ircc_cb *priv, __u32 baud)
struct ali_ircc_cb *self = (struct ali_ircc_cb *) priv; struct ali_ircc_cb *self = (struct ali_ircc_cb *) priv;
struct net_device *dev; struct net_device *dev;
IRDA_DEBUG(1, __FUNCTION__ "(), ---------------- Start ----------------\n"); IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
dev = self->netdev; dev = self->netdev;
iobase = self->io.fir_base; iobase = self->io.fir_base;
IRDA_DEBUG(1, __FUNCTION__ "(), self->io.speed = %d, change to speed = %d\n",self->io.speed,baud); IRDA_DEBUG(1, "%s(), self->io.speed = %d, change to speed = %d\n", __FUNCTION__ ,self->io.speed,baud);
/* Come from SIR speed */ /* Come from SIR speed */
if(self->io.speed <=115200) if(self->io.speed <=115200)
...@@ -1007,7 +1007,7 @@ static void ali_ircc_fir_change_speed(struct ali_ircc_cb *priv, __u32 baud) ...@@ -1007,7 +1007,7 @@ static void ali_ircc_fir_change_speed(struct ali_ircc_cb *priv, __u32 baud)
// Set Dongle Speed mode // Set Dongle Speed mode
ali_ircc_change_dongle_speed(self, baud); ali_ircc_change_dongle_speed(self, baud);
IRDA_DEBUG(1, __FUNCTION__ "(), ----------------- End ------------------\n"); IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __FUNCTION__ );
} }
/* /*
...@@ -1025,9 +1025,9 @@ static void ali_ircc_sir_change_speed(struct ali_ircc_cb *priv, __u32 speed) ...@@ -1025,9 +1025,9 @@ static void ali_ircc_sir_change_speed(struct ali_ircc_cb *priv, __u32 speed)
int lcr; /* Line control reg */ int lcr; /* Line control reg */
int divisor; int divisor;
IRDA_DEBUG(1, __FUNCTION__ "(), ---------------- Start ----------------\n"); IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __FUNCTION__ );
IRDA_DEBUG(1, __FUNCTION__ "(), Setting speed to: %d\n", speed); IRDA_DEBUG(1, "%s(), Setting speed to: %d\n", __FUNCTION__ , speed);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
...@@ -1081,7 +1081,7 @@ static void ali_ircc_sir_change_speed(struct ali_ircc_cb *priv, __u32 speed) ...@@ -1081,7 +1081,7 @@ static void ali_ircc_sir_change_speed(struct ali_ircc_cb *priv, __u32 speed)
spin_unlock_irqrestore(&self->lock, flags); spin_unlock_irqrestore(&self->lock, flags);
IRDA_DEBUG(1, __FUNCTION__ "(), ----------------- End ------------------\n"); IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __FUNCTION__ );
} }
static void ali_ircc_change_dongle_speed(struct ali_ircc_cb *priv, int speed) static void ali_ircc_change_dongle_speed(struct ali_ircc_cb *priv, int speed)
...@@ -1091,14 +1091,14 @@ static void ali_ircc_change_dongle_speed(struct ali_ircc_cb *priv, int speed) ...@@ -1091,14 +1091,14 @@ static void ali_ircc_change_dongle_speed(struct ali_ircc_cb *priv, int speed)
int iobase,dongle_id; int iobase,dongle_id;
int tmp = 0; int tmp = 0;
IRDA_DEBUG(1, __FUNCTION__ "(), ---------------- Start ----------------\n"); IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __FUNCTION__ );
iobase = self->io.fir_base; /* or iobase = self->io.sir_base; */ iobase = self->io.fir_base; /* or iobase = self->io.sir_base; */
dongle_id = self->io.dongle_id; dongle_id = self->io.dongle_id;
/* We are already locked, no need to do it again */ /* We are already locked, no need to do it again */
IRDA_DEBUG(1, __FUNCTION__ "(), Set Speed for %s , Speed = %d\n", dongle_types[dongle_id], speed); IRDA_DEBUG(1, "%s(), Set Speed for %s , Speed = %d\n", __FUNCTION__ , dongle_types[dongle_id], speed);
switch_bank(iobase, BANK2); switch_bank(iobase, BANK2);
tmp = inb(iobase+FIR_IRDA_CR); tmp = inb(iobase+FIR_IRDA_CR);
...@@ -1262,7 +1262,7 @@ static void ali_ircc_change_dongle_speed(struct ali_ircc_cb *priv, int speed) ...@@ -1262,7 +1262,7 @@ static void ali_ircc_change_dongle_speed(struct ali_ircc_cb *priv, int speed)
switch_bank(iobase, BANK0); switch_bank(iobase, BANK0);
IRDA_DEBUG(1, __FUNCTION__ "(), ----------------- End ------------------\n"); IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __FUNCTION__ );
} }
/* /*
...@@ -1275,11 +1275,11 @@ static int ali_ircc_sir_write(int iobase, int fifo_size, __u8 *buf, int len) ...@@ -1275,11 +1275,11 @@ static int ali_ircc_sir_write(int iobase, int fifo_size, __u8 *buf, int len)
{ {
int actual = 0; int actual = 0;
IRDA_DEBUG(2, __FUNCTION__ "(), ---------------- Start ----------------\n"); IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__ );
/* 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;
} }
...@@ -1291,7 +1291,7 @@ static int ali_ircc_sir_write(int iobase, int fifo_size, __u8 *buf, int len) ...@@ -1291,7 +1291,7 @@ static int ali_ircc_sir_write(int iobase, int fifo_size, __u8 *buf, int len)
actual++; actual++;
} }
IRDA_DEBUG(2, __FUNCTION__ "(), ----------------- End ------------------\n"); IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ );
return actual; return actual;
} }
...@@ -1303,14 +1303,14 @@ static int ali_ircc_sir_write(int iobase, int fifo_size, __u8 *buf, int len) ...@@ -1303,14 +1303,14 @@ static int ali_ircc_sir_write(int iobase, int fifo_size, __u8 *buf, int len)
*/ */
static int ali_ircc_net_init(struct net_device *dev) static int ali_ircc_net_init(struct net_device *dev)
{ {
IRDA_DEBUG(2, __FUNCTION__ "(), ---------------- Start ----------------\n"); IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__ );
/* Setup to be a normal IrDA network device driver */ /* Setup to be a normal IrDA network device driver */
irda_device_setup(dev); irda_device_setup(dev);
/* Insert overrides below this line! */ /* Insert overrides below this line! */
IRDA_DEBUG(2, __FUNCTION__ "(), ----------------- End ------------------\n"); IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ );
return 0; return 0;
} }
...@@ -1327,7 +1327,7 @@ static int ali_ircc_net_open(struct net_device *dev) ...@@ -1327,7 +1327,7 @@ static int ali_ircc_net_open(struct net_device *dev)
int iobase; int iobase;
char hwname[32]; char hwname[32];
IRDA_DEBUG(2, __FUNCTION__ "(), ---------------- Start ----------------\n"); IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__ );
ASSERT(dev != NULL, return -1;); ASSERT(dev != NULL, return -1;);
...@@ -1373,7 +1373,7 @@ static int ali_ircc_net_open(struct net_device *dev) ...@@ -1373,7 +1373,7 @@ static int ali_ircc_net_open(struct net_device *dev)
MOD_INC_USE_COUNT; MOD_INC_USE_COUNT;
IRDA_DEBUG(2, __FUNCTION__ "(), ----------------- End ------------------\n"); IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ );
return 0; return 0;
} }
...@@ -1390,7 +1390,7 @@ static int ali_ircc_net_close(struct net_device *dev) ...@@ -1390,7 +1390,7 @@ static int ali_ircc_net_close(struct net_device *dev)
struct ali_ircc_cb *self; struct ali_ircc_cb *self;
//int iobase; //int iobase;
IRDA_DEBUG(4, __FUNCTION__ "(), ---------------- Start ----------------\n"); IRDA_DEBUG(4, "%s(), ---------------- Start ----------------\n", __FUNCTION__ );
ASSERT(dev != NULL, return -1;); ASSERT(dev != NULL, return -1;);
...@@ -1415,7 +1415,7 @@ static int ali_ircc_net_close(struct net_device *dev) ...@@ -1415,7 +1415,7 @@ static int ali_ircc_net_close(struct net_device *dev)
MOD_DEC_USE_COUNT; MOD_DEC_USE_COUNT;
IRDA_DEBUG(2, __FUNCTION__ "(), ----------------- End ------------------\n"); IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ );
return 0; return 0;
} }
...@@ -1434,7 +1434,7 @@ static int ali_ircc_fir_hard_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -1434,7 +1434,7 @@ static int ali_ircc_fir_hard_xmit(struct sk_buff *skb, struct net_device *dev)
__u32 speed; __u32 speed;
int mtt, diff; int mtt, diff;
IRDA_DEBUG(1, __FUNCTION__ "(), ---------------- Start -----------------\n"); IRDA_DEBUG(1, "%s(), ---------------- Start -----------------\n", __FUNCTION__ );
self = (struct ali_ircc_cb *) dev->priv; self = (struct ali_ircc_cb *) dev->priv;
iobase = self->io.fir_base; iobase = self->io.fir_base;
...@@ -1488,7 +1488,7 @@ static int ali_ircc_fir_hard_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -1488,7 +1488,7 @@ static int ali_ircc_fir_hard_xmit(struct sk_buff *skb, struct net_device *dev)
diff = self->now.tv_usec - self->stamp.tv_usec; diff = self->now.tv_usec - self->stamp.tv_usec;
/* self->stamp is set from ali_ircc_dma_receive_complete() */ /* self->stamp is set from ali_ircc_dma_receive_complete() */
IRDA_DEBUG(1, __FUNCTION__ "(), ******* diff = %d ******* \n", diff); IRDA_DEBUG(1, "%s(), ******* diff = %d ******* \n", __FUNCTION__ , diff);
if (diff < 0) if (diff < 0)
diff += 1000000; diff += 1000000;
...@@ -1510,7 +1510,7 @@ static int ali_ircc_fir_hard_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -1510,7 +1510,7 @@ static int ali_ircc_fir_hard_xmit(struct sk_buff *skb, struct net_device *dev)
/* Adjust for timer resolution */ /* Adjust for timer resolution */
mtt = (mtt+250) / 500; /* 4 discard, 5 get advanced, Let's round off */ mtt = (mtt+250) / 500; /* 4 discard, 5 get advanced, Let's round off */
IRDA_DEBUG(1, __FUNCTION__ "(), ************** mtt = %d ***********\n", mtt); IRDA_DEBUG(1, "%s(), ************** mtt = %d ***********\n", __FUNCTION__ , mtt);
/* Setup timer */ /* Setup timer */
if (mtt == 1) /* 500 us */ if (mtt == 1) /* 500 us */
...@@ -1566,7 +1566,7 @@ static int ali_ircc_fir_hard_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -1566,7 +1566,7 @@ static int ali_ircc_fir_hard_xmit(struct sk_buff *skb, struct net_device *dev)
spin_unlock_irqrestore(&self->lock, flags); spin_unlock_irqrestore(&self->lock, flags);
dev_kfree_skb(skb); dev_kfree_skb(skb);
IRDA_DEBUG(1, __FUNCTION__ "(), ----------------- End ------------------\n"); IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __FUNCTION__ );
return 0; return 0;
} }
...@@ -1577,7 +1577,7 @@ static void ali_ircc_dma_xmit(struct ali_ircc_cb *self) ...@@ -1577,7 +1577,7 @@ static void ali_ircc_dma_xmit(struct ali_ircc_cb *self)
unsigned char FIFO_OPTI, Hi, Lo; unsigned char FIFO_OPTI, Hi, Lo;
IRDA_DEBUG(1, __FUNCTION__ "(), ---------------- Start -----------------\n"); IRDA_DEBUG(1, "%s(), ---------------- Start -----------------\n", __FUNCTION__ );
iobase = self->io.fir_base; iobase = self->io.fir_base;
...@@ -1627,7 +1627,7 @@ static void ali_ircc_dma_xmit(struct ali_ircc_cb *self) ...@@ -1627,7 +1627,7 @@ static void ali_ircc_dma_xmit(struct ali_ircc_cb *self)
tmp = inb(iobase+FIR_LCR_B); tmp = inb(iobase+FIR_LCR_B);
tmp &= ~0x20; // Disable SIP tmp &= ~0x20; // Disable SIP
outb(((unsigned char)(tmp & 0x3f) | LCR_B_TX_MODE) & ~LCR_B_BW, iobase+FIR_LCR_B); outb(((unsigned char)(tmp & 0x3f) | LCR_B_TX_MODE) & ~LCR_B_BW, iobase+FIR_LCR_B);
IRDA_DEBUG(1, __FUNCTION__ "(), ******* Change to TX mode: FIR_LCR_B = 0x%x ******* \n", inb(iobase+FIR_LCR_B)); IRDA_DEBUG(1, "%s(), ******* Change to TX mode: FIR_LCR_B = 0x%x ******* \n", __FUNCTION__ , inb(iobase+FIR_LCR_B));
outb(0, iobase+FIR_LSR); outb(0, iobase+FIR_LSR);
...@@ -1637,7 +1637,7 @@ static void ali_ircc_dma_xmit(struct ali_ircc_cb *self) ...@@ -1637,7 +1637,7 @@ static void ali_ircc_dma_xmit(struct ali_ircc_cb *self)
switch_bank(iobase, BANK0); switch_bank(iobase, BANK0);
IRDA_DEBUG(1, __FUNCTION__ "(), ----------------- End ------------------\n"); IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __FUNCTION__ );
} }
static int ali_ircc_dma_xmit_complete(struct ali_ircc_cb *self) static int ali_ircc_dma_xmit_complete(struct ali_ircc_cb *self)
...@@ -1645,7 +1645,7 @@ static int ali_ircc_dma_xmit_complete(struct ali_ircc_cb *self) ...@@ -1645,7 +1645,7 @@ static int ali_ircc_dma_xmit_complete(struct ali_ircc_cb *self)
int iobase; int iobase;
int ret = TRUE; int ret = TRUE;
IRDA_DEBUG(1, __FUNCTION__ "(), ---------------- Start -----------------\n"); IRDA_DEBUG(1, "%s(), ---------------- Start -----------------\n", __FUNCTION__ );
iobase = self->io.fir_base; iobase = self->io.fir_base;
...@@ -1701,7 +1701,7 @@ static int ali_ircc_dma_xmit_complete(struct ali_ircc_cb *self) ...@@ -1701,7 +1701,7 @@ static int ali_ircc_dma_xmit_complete(struct ali_ircc_cb *self)
switch_bank(iobase, BANK0); switch_bank(iobase, BANK0);
IRDA_DEBUG(1, __FUNCTION__ "(), ----------------- End ------------------\n"); IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __FUNCTION__ );
return ret; return ret;
} }
...@@ -1716,7 +1716,7 @@ static int ali_ircc_dma_receive(struct ali_ircc_cb *self) ...@@ -1716,7 +1716,7 @@ static int ali_ircc_dma_receive(struct ali_ircc_cb *self)
{ {
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;
...@@ -1754,7 +1754,7 @@ static int ali_ircc_dma_receive(struct ali_ircc_cb *self) ...@@ -1754,7 +1754,7 @@ static int ali_ircc_dma_receive(struct ali_ircc_cb *self)
//switch_bank(iobase, BANK0); //switch_bank(iobase, BANK0);
tmp = inb(iobase+FIR_LCR_B); tmp = inb(iobase+FIR_LCR_B);
outb((unsigned char)(tmp &0x3f) | LCR_B_RX_MODE | LCR_B_BW , iobase + FIR_LCR_B); // 2000/12/1 05:16PM outb((unsigned char)(tmp &0x3f) | LCR_B_RX_MODE | LCR_B_BW , iobase + FIR_LCR_B); // 2000/12/1 05:16PM
IRDA_DEBUG(1, __FUNCTION__ "(), *** Change To RX mode: FIR_LCR_B = 0x%x *** \n", inb(iobase+FIR_LCR_B)); IRDA_DEBUG(1, "%s(), *** Change To RX mode: FIR_LCR_B = 0x%x *** \n", __FUNCTION__ , inb(iobase+FIR_LCR_B));
/* Set Rx Threshold */ /* Set Rx Threshold */
switch_bank(iobase, BANK1); switch_bank(iobase, BANK1);
...@@ -1766,7 +1766,7 @@ static int ali_ircc_dma_receive(struct ali_ircc_cb *self) ...@@ -1766,7 +1766,7 @@ static int ali_ircc_dma_receive(struct ali_ircc_cb *self)
outb(CR_DMA_EN | CR_DMA_BURST, iobase+FIR_CR); outb(CR_DMA_EN | CR_DMA_BURST, iobase+FIR_CR);
switch_bank(iobase, BANK0); switch_bank(iobase, BANK0);
IRDA_DEBUG(1, __FUNCTION__ "(), ----------------- End ------------------\n"); IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __FUNCTION__ );
return 0; return 0;
} }
...@@ -1777,7 +1777,7 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self) ...@@ -1777,7 +1777,7 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self)
__u8 status, MessageCount; __u8 status, MessageCount;
int len, i, iobase, val; int len, i, iobase, val;
IRDA_DEBUG(1, __FUNCTION__ "(), ---------------- Start -----------------\n"); IRDA_DEBUG(1, "%s(), ---------------- Start -----------------\n", __FUNCTION__ );
st_fifo = &self->st_fifo; st_fifo = &self->st_fifo;
iobase = self->io.fir_base; iobase = self->io.fir_base;
...@@ -1786,7 +1786,7 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self) ...@@ -1786,7 +1786,7 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self)
MessageCount = inb(iobase+ FIR_LSR)&0x07; MessageCount = inb(iobase+ FIR_LSR)&0x07;
if (MessageCount > 0) if (MessageCount > 0)
IRDA_DEBUG(0, __FUNCTION__ "(), Messsage count = %d,\n", MessageCount); IRDA_DEBUG(0, "%s(), Messsage count = %d,\n", __FUNCTION__ , MessageCount);
for (i=0; i<=MessageCount; i++) for (i=0; i<=MessageCount; i++)
{ {
...@@ -1799,11 +1799,11 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self) ...@@ -1799,11 +1799,11 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self)
len = len << 8; len = len << 8;
len |= inb(iobase+FIR_RX_DSR_LO); len |= inb(iobase+FIR_RX_DSR_LO);
IRDA_DEBUG(1, __FUNCTION__ "(), RX Length = 0x%.2x,\n", len); IRDA_DEBUG(1, "%s(), RX Length = 0x%.2x,\n", __FUNCTION__ , len);
IRDA_DEBUG(1, __FUNCTION__ "(), RX Status = 0x%.2x,\n", status); IRDA_DEBUG(1, "%s(), RX Status = 0x%.2x,\n", __FUNCTION__ , status);
if (st_fifo->tail >= MAX_RX_WINDOW) { 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; continue;
} }
...@@ -1826,7 +1826,7 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self) ...@@ -1826,7 +1826,7 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self)
/* Check for errors */ /* Check for errors */
if ((status & 0xd8) || self->rcvFramesOverflow || (len==0)) if ((status & 0xd8) || self->rcvFramesOverflow || (len==0))
{ {
IRDA_DEBUG(0,__FUNCTION__ "(), ************* RX Errors ************ \n"); IRDA_DEBUG(0,"%s(), ************* RX Errors ************ \n", __FUNCTION__ );
/* Skip frame */ /* Skip frame */
self->stats.rx_errors++; self->stats.rx_errors++;
...@@ -1836,29 +1836,29 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self) ...@@ -1836,29 +1836,29 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self)
if (status & LSR_FIFO_UR) if (status & LSR_FIFO_UR)
{ {
self->stats.rx_frame_errors++; self->stats.rx_frame_errors++;
IRDA_DEBUG(0,__FUNCTION__ "(), ************* FIFO Errors ************ \n"); IRDA_DEBUG(0,"%s(), ************* FIFO Errors ************ \n", __FUNCTION__ );
} }
if (status & LSR_FRAME_ERROR) if (status & LSR_FRAME_ERROR)
{ {
self->stats.rx_frame_errors++; self->stats.rx_frame_errors++;
IRDA_DEBUG(0,__FUNCTION__ "(), ************* FRAME Errors ************ \n"); IRDA_DEBUG(0,"%s(), ************* FRAME Errors ************ \n", __FUNCTION__ );
} }
if (status & LSR_CRC_ERROR) if (status & LSR_CRC_ERROR)
{ {
self->stats.rx_crc_errors++; self->stats.rx_crc_errors++;
IRDA_DEBUG(0,__FUNCTION__ "(), ************* CRC Errors ************ \n"); IRDA_DEBUG(0,"%s(), ************* CRC Errors ************ \n", __FUNCTION__ );
} }
if(self->rcvFramesOverflow) if(self->rcvFramesOverflow)
{ {
self->stats.rx_frame_errors++; self->stats.rx_frame_errors++;
IRDA_DEBUG(0,__FUNCTION__ "(), ************* Overran DMA buffer ************ \n"); IRDA_DEBUG(0,"%s(), ************* Overran DMA buffer ************ \n", __FUNCTION__ );
} }
if(len == 0) if(len == 0)
{ {
self->stats.rx_frame_errors++; self->stats.rx_frame_errors++;
IRDA_DEBUG(0,__FUNCTION__ "(), ********** Receive Frame Size = 0 ********* \n"); IRDA_DEBUG(0,"%s(), ********** Receive Frame Size = 0 ********* \n", __FUNCTION__ );
} }
} }
else else
...@@ -1870,7 +1870,7 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self) ...@@ -1870,7 +1870,7 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self)
val = inb(iobase+FIR_BSR); val = inb(iobase+FIR_BSR);
if ((val& BSR_FIFO_NOT_EMPTY)== 0x80) if ((val& BSR_FIFO_NOT_EMPTY)== 0x80)
{ {
IRDA_DEBUG(0, __FUNCTION__ "(), ************* BSR_FIFO_NOT_EMPTY ************ \n"); IRDA_DEBUG(0, "%s(), ************* BSR_FIFO_NOT_EMPTY ************ \n", __FUNCTION__ );
/* Put this entry back in fifo */ /* Put this entry back in fifo */
st_fifo->head--; st_fifo->head--;
...@@ -1934,7 +1934,7 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self) ...@@ -1934,7 +1934,7 @@ static int ali_ircc_dma_receive_complete(struct ali_ircc_cb *self)
switch_bank(iobase, BANK0); switch_bank(iobase, BANK0);
IRDA_DEBUG(1, __FUNCTION__ "(), ----------------- End ------------------\n"); IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __FUNCTION__ );
return TRUE; return TRUE;
} }
...@@ -1953,7 +1953,7 @@ static int ali_ircc_sir_hard_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -1953,7 +1953,7 @@ static int ali_ircc_sir_hard_xmit(struct sk_buff *skb, struct net_device *dev)
int iobase; int iobase;
__u32 speed; __u32 speed;
IRDA_DEBUG(2, __FUNCTION__ "(), ---------------- Start ----------------\n"); IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__ );
ASSERT(dev != NULL, return 0;); ASSERT(dev != NULL, return 0;);
...@@ -2000,7 +2000,7 @@ static int ali_ircc_sir_hard_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -2000,7 +2000,7 @@ static int ali_ircc_sir_hard_xmit(struct sk_buff *skb, struct net_device *dev)
dev_kfree_skb(skb); dev_kfree_skb(skb);
IRDA_DEBUG(2, __FUNCTION__ "(), ----------------- End ------------------\n"); IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ );
return 0; return 0;
} }
...@@ -2019,7 +2019,7 @@ static int ali_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -2019,7 +2019,7 @@ static int ali_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
unsigned long flags; unsigned long flags;
int ret = 0; int ret = 0;
IRDA_DEBUG(2, __FUNCTION__ "(), ---------------- Start ----------------\n"); IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__ );
ASSERT(dev != NULL, return -1;); ASSERT(dev != NULL, return -1;);
...@@ -2027,11 +2027,11 @@ static int ali_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -2027,11 +2027,11 @@ static int ali_ircc_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 */
IRDA_DEBUG(1, __FUNCTION__ "(), SIOCSBANDWIDTH\n"); IRDA_DEBUG(1, "%s(), SIOCSBANDWIDTH\n", __FUNCTION__ );
/* /*
* This function will also be used by IrLAP to change the * This function will also be used by IrLAP to change the
* speed, so we still must allow for speed change within * speed, so we still must allow for speed change within
...@@ -2045,13 +2045,13 @@ static int ali_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -2045,13 +2045,13 @@ static int ali_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
spin_unlock_irqrestore(&self->lock, flags); spin_unlock_irqrestore(&self->lock, flags);
break; break;
case SIOCSMEDIABUSY: /* Set media busy */ case SIOCSMEDIABUSY: /* Set media busy */
IRDA_DEBUG(1, __FUNCTION__ "(), SIOCSMEDIABUSY\n"); IRDA_DEBUG(1, "%s(), SIOCSMEDIABUSY\n", __FUNCTION__ );
if (!capable(CAP_NET_ADMIN)) if (!capable(CAP_NET_ADMIN))
return -EPERM; return -EPERM;
irda_device_set_media_busy(self->netdev, TRUE); irda_device_set_media_busy(self->netdev, TRUE);
break; break;
case SIOCGRECEIVING: /* Check if we are receiving right now */ case SIOCGRECEIVING: /* Check if we are receiving right now */
IRDA_DEBUG(2, __FUNCTION__ "(), SIOCGRECEIVING\n"); IRDA_DEBUG(2, "%s(), SIOCGRECEIVING\n", __FUNCTION__ );
/* This is protected */ /* This is protected */
irq->ifr_receiving = ali_ircc_is_receiving(self); irq->ifr_receiving = ali_ircc_is_receiving(self);
break; break;
...@@ -2059,7 +2059,7 @@ static int ali_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -2059,7 +2059,7 @@ static int ali_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
ret = -EOPNOTSUPP; ret = -EOPNOTSUPP;
} }
IRDA_DEBUG(2, __FUNCTION__ "(), ----------------- End ------------------\n"); IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ );
return ret; return ret;
} }
...@@ -2076,7 +2076,7 @@ static int ali_ircc_is_receiving(struct ali_ircc_cb *self) ...@@ -2076,7 +2076,7 @@ static int ali_ircc_is_receiving(struct ali_ircc_cb *self)
int status = FALSE; int status = FALSE;
int iobase; int iobase;
IRDA_DEBUG(2, __FUNCTION__ "(), ---------------- Start -----------------\n"); IRDA_DEBUG(2, "%s(), ---------------- Start -----------------\n", __FUNCTION__ );
ASSERT(self != NULL, return FALSE;); ASSERT(self != NULL, return FALSE;);
...@@ -2090,7 +2090,7 @@ static int ali_ircc_is_receiving(struct ali_ircc_cb *self) ...@@ -2090,7 +2090,7 @@ static int ali_ircc_is_receiving(struct ali_ircc_cb *self)
if((inb(iobase+FIR_FIFO_FR) & 0x3f) != 0) if((inb(iobase+FIR_FIFO_FR) & 0x3f) != 0)
{ {
/* We are receiving something */ /* We are receiving something */
IRDA_DEBUG(1, __FUNCTION__ "(), We are receiving something\n"); IRDA_DEBUG(1, "%s(), We are receiving something\n", __FUNCTION__ );
status = TRUE; status = TRUE;
} }
switch_bank(iobase, BANK0); switch_bank(iobase, BANK0);
...@@ -2102,7 +2102,7 @@ static int ali_ircc_is_receiving(struct ali_ircc_cb *self) ...@@ -2102,7 +2102,7 @@ static int ali_ircc_is_receiving(struct ali_ircc_cb *self)
spin_unlock_irqrestore(&self->lock, flags); spin_unlock_irqrestore(&self->lock, flags);
IRDA_DEBUG(2, __FUNCTION__ "(), ----------------- End ------------------\n"); IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ );
return status; return status;
} }
...@@ -2111,16 +2111,16 @@ static struct net_device_stats *ali_ircc_net_get_stats(struct net_device *dev) ...@@ -2111,16 +2111,16 @@ static struct net_device_stats *ali_ircc_net_get_stats(struct net_device *dev)
{ {
struct ali_ircc_cb *self = (struct ali_ircc_cb *) dev->priv; struct ali_ircc_cb *self = (struct ali_ircc_cb *) dev->priv;
IRDA_DEBUG(2, __FUNCTION__ "(), ---------------- Start ----------------\n"); IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__ );
IRDA_DEBUG(2, __FUNCTION__ "(), ----------------- End ------------------\n"); IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ );
return &self->stats; return &self->stats;
} }
static void ali_ircc_suspend(struct ali_ircc_cb *self) static void ali_ircc_suspend(struct ali_ircc_cb *self)
{ {
IRDA_DEBUG(2, __FUNCTION__ "(), ---------------- Start ----------------\n"); IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__ );
MESSAGE("%s, Suspending\n", driver_name); MESSAGE("%s, Suspending\n", driver_name);
...@@ -2131,12 +2131,12 @@ static void ali_ircc_suspend(struct ali_ircc_cb *self) ...@@ -2131,12 +2131,12 @@ static void ali_ircc_suspend(struct ali_ircc_cb *self)
self->io.suspended = 1; self->io.suspended = 1;
IRDA_DEBUG(2, __FUNCTION__ "(), ----------------- End ------------------\n"); IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ );
} }
static void ali_ircc_wakeup(struct ali_ircc_cb *self) static void ali_ircc_wakeup(struct ali_ircc_cb *self)
{ {
IRDA_DEBUG(2, __FUNCTION__ "(), ---------------- Start ----------------\n"); IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__ );
if (!self->io.suspended) if (!self->io.suspended)
return; return;
...@@ -2147,14 +2147,14 @@ static void ali_ircc_wakeup(struct ali_ircc_cb *self) ...@@ -2147,14 +2147,14 @@ static void ali_ircc_wakeup(struct ali_ircc_cb *self)
self->io.suspended = 0; self->io.suspended = 0;
IRDA_DEBUG(2, __FUNCTION__ "(), ----------------- End ------------------\n"); IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ );
} }
static int ali_ircc_pmproc(struct pm_dev *dev, pm_request_t rqst, void *data) static int ali_ircc_pmproc(struct pm_dev *dev, pm_request_t rqst, void *data)
{ {
struct ali_ircc_cb *self = (struct ali_ircc_cb*) dev->data; struct ali_ircc_cb *self = (struct ali_ircc_cb*) dev->data;
IRDA_DEBUG(2, __FUNCTION__ "(), ---------------- Start ----------------\n"); IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__ );
if (self) { if (self) {
switch (rqst) { switch (rqst) {
...@@ -2167,7 +2167,7 @@ static int ali_ircc_pmproc(struct pm_dev *dev, pm_request_t rqst, void *data) ...@@ -2167,7 +2167,7 @@ static int ali_ircc_pmproc(struct pm_dev *dev, pm_request_t rqst, void *data)
} }
} }
IRDA_DEBUG(2, __FUNCTION__ "(), ----------------- End ------------------\n"); IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ );
return 0; return 0;
} }
...@@ -2182,7 +2182,7 @@ static void SetCOMInterrupts(struct ali_ircc_cb *self , unsigned char enable) ...@@ -2182,7 +2182,7 @@ static void SetCOMInterrupts(struct ali_ircc_cb *self , unsigned char enable)
int iobase = self->io.fir_base; /* or sir_base */ int iobase = self->io.fir_base; /* or sir_base */
IRDA_DEBUG(2, __FUNCTION__ "(), -------- Start -------- ( Enable = %d )\n", enable); IRDA_DEBUG(2, "%s(), -------- Start -------- ( Enable = %d )\n", __FUNCTION__ , enable);
/* Enable the interrupt which we wish to */ /* Enable the interrupt which we wish to */
if (enable){ if (enable){
...@@ -2223,14 +2223,14 @@ static void SetCOMInterrupts(struct ali_ircc_cb *self , unsigned char enable) ...@@ -2223,14 +2223,14 @@ static void SetCOMInterrupts(struct ali_ircc_cb *self , unsigned char enable)
else else
outb(newMask, iobase+UART_IER); outb(newMask, iobase+UART_IER);
IRDA_DEBUG(2, __FUNCTION__ "(), ----------------- End ------------------\n"); IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__ );
} }
static void SIR2FIR(int iobase) static void SIR2FIR(int iobase)
{ {
//unsigned char tmp; //unsigned char tmp;
IRDA_DEBUG(1, __FUNCTION__ "(), ---------------- Start ----------------\n"); IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __FUNCTION__ );
/* Already protected (change_speed() or setup()), no need to lock. /* Already protected (change_speed() or setup()), no need to lock.
* Jean II */ * Jean II */
...@@ -2246,14 +2246,14 @@ static void SIR2FIR(int iobase) ...@@ -2246,14 +2246,14 @@ static void SIR2FIR(int iobase)
//tmp |= 0x20; //tmp |= 0x20;
//outb(tmp, iobase+FIR_LCR_B); //outb(tmp, iobase+FIR_LCR_B);
IRDA_DEBUG(1, __FUNCTION__ "(), ----------------- End ------------------\n"); IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __FUNCTION__ );
} }
static void FIR2SIR(int iobase) static void FIR2SIR(int iobase)
{ {
unsigned char val; unsigned char val;
IRDA_DEBUG(1, __FUNCTION__ "(), ---------------- Start ----------------\n"); IRDA_DEBUG(1, "%s(), ---------------- Start ----------------\n", __FUNCTION__ );
/* Already protected (change_speed() or setup()), no need to lock. /* Already protected (change_speed() or setup()), no need to lock.
* Jean II */ * Jean II */
...@@ -2269,7 +2269,7 @@ static void FIR2SIR(int iobase) ...@@ -2269,7 +2269,7 @@ static void FIR2SIR(int iobase)
val = inb(iobase+UART_LSR); val = inb(iobase+UART_LSR);
val = inb(iobase+UART_MSR); val = inb(iobase+UART_MSR);
IRDA_DEBUG(1, __FUNCTION__ "(), ----------------- End ------------------\n"); IRDA_DEBUG(1, "%s(), ----------------- End ------------------\n", __FUNCTION__ );
} }
MODULE_AUTHOR("Benjamin Kong <benjamin_kong@ali.com.tw>"); MODULE_AUTHOR("Benjamin Kong <benjamin_kong@ali.com.tw>");
......
...@@ -170,7 +170,7 @@ static inline void register_bank(int iobase, int bank) ...@@ -170,7 +170,7 @@ static inline void register_bank(int iobase, int bank)
static int __init smc_access(unsigned short cfg_base,unsigned char reg) static int __init smc_access(unsigned short cfg_base,unsigned char reg)
{ {
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
outb(reg, cfg_base); outb(reg, cfg_base);
...@@ -184,7 +184,7 @@ static const smc_chip_t * __init smc_probe(unsigned short cfg_base,u8 reg,const ...@@ -184,7 +184,7 @@ static const smc_chip_t * __init smc_probe(unsigned short cfg_base,u8 reg,const
{ {
u8 devid,xdevid,rev; u8 devid,xdevid,rev;
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
/* Leave configuration */ /* Leave configuration */
...@@ -263,7 +263,7 @@ static int __init smc_superio_flat(const smc_chip_t *chips, unsigned short cfg_b ...@@ -263,7 +263,7 @@ static int __init smc_superio_flat(const smc_chip_t *chips, unsigned short cfg_b
u8 mode; u8 mode;
int ret = -ENODEV; int ret = -ENODEV;
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
if (smc_probe(cfg_base,0xD,chips,type)==NULL) if (smc_probe(cfg_base,0xD,chips,type)==NULL)
return ret; return ret;
...@@ -307,7 +307,7 @@ static int __init smc_superio_paged(const smc_chip_t *chips, unsigned short cfg_ ...@@ -307,7 +307,7 @@ static int __init smc_superio_paged(const smc_chip_t *chips, unsigned short cfg_
unsigned short sir_io; unsigned short sir_io;
int ret = -ENODEV; int ret = -ENODEV;
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
if (smc_probe(cfg_base,0x20,chips,type)==NULL) if (smc_probe(cfg_base,0x20,chips,type)==NULL)
return ret; return ret;
...@@ -343,7 +343,7 @@ static int __init smc_superio_paged(const smc_chip_t *chips, unsigned short cfg_ ...@@ -343,7 +343,7 @@ static int __init smc_superio_paged(const smc_chip_t *chips, unsigned short cfg_
static int __init smc_superio_fdc(unsigned short cfg_base) static int __init smc_superio_fdc(unsigned short cfg_base)
{ {
if (check_region(cfg_base, 2) < 0) { if (check_region(cfg_base, 2) < 0) {
IRDA_DEBUG(0, __FUNCTION__ ": can't get cfg_base of 0x%03x\n", IRDA_DEBUG(0, "%s: can't get cfg_base of 0x%03x\n", __FUNCTION__ ,
cfg_base); cfg_base);
return -1; return -1;
} }
...@@ -358,7 +358,7 @@ static int __init smc_superio_lpc(unsigned short cfg_base) ...@@ -358,7 +358,7 @@ static int __init smc_superio_lpc(unsigned short cfg_base)
{ {
#if 0 #if 0
if (check_region(cfg_base, 2) < 0) { if (check_region(cfg_base, 2) < 0) {
IRDA_DEBUG(0, __FUNCTION__ ": can't get cfg_base of 0x%03x\n", IRDA_DEBUG(0, "%s: can't get cfg_base of 0x%03x\n", __FUNCTION__ ,
cfg_base); cfg_base);
return -1; return -1;
} }
...@@ -380,7 +380,7 @@ int __init ircc_init(void) ...@@ -380,7 +380,7 @@ int __init ircc_init(void)
{ {
int ret=-ENODEV; int ret=-ENODEV;
IRDA_DEBUG(0, __FUNCTION__ "\n"); IRDA_DEBUG(0, "%s\n", __FUNCTION__ );
dev_count=0; dev_count=0;
...@@ -403,8 +403,8 @@ int __init ircc_init(void) ...@@ -403,8 +403,8 @@ int __init ircc_init(void)
/* Trys to open for all the SMC chipsets we know about */ /* Trys to open for all the SMC chipsets we know about */
IRDA_DEBUG(0, __FUNCTION__ IRDA_DEBUG(0,
" Try to open all known SMC chipsets\n"); "%s Try to open all known SMC chipsets\n", __FUNCTION__ );
if (!smc_superio_fdc(0x3f0)) if (!smc_superio_fdc(0x3f0))
ret=0; ret=0;
...@@ -434,16 +434,16 @@ static int __init ircc_open(unsigned int fir_base, unsigned int sir_base) ...@@ -434,16 +434,16 @@ static int __init ircc_open(unsigned int fir_base, unsigned int sir_base)
unsigned long flags; unsigned long flags;
IRDA_DEBUG(0, __FUNCTION__ "\n"); IRDA_DEBUG(0, "%s\n", __FUNCTION__ );
if (check_region(fir_base, CHIP_IO_EXTENT) < 0) { if (check_region(fir_base, CHIP_IO_EXTENT) < 0) {
IRDA_DEBUG(0, __FUNCTION__ ": can't get fir_base of 0x%03x\n", IRDA_DEBUG(0, "%s: can't get fir_base of 0x%03x\n", __FUNCTION__ ,
fir_base); fir_base);
return -ENODEV; return -ENODEV;
} }
#if POSSIBLE_USED_BY_SERIAL_DRIVER #if POSSIBLE_USED_BY_SERIAL_DRIVER
if (check_region(sir_base, CHIP_IO_EXTENT) < 0) { if (check_region(sir_base, CHIP_IO_EXTENT) < 0) {
IRDA_DEBUG(0, __FUNCTION__ ": can't get sir_base of 0x%03x\n", IRDA_DEBUG(0, "%s: can't get sir_base of 0x%03x\n", __FUNCTION__ ,
sir_base); sir_base);
return -ENODEV; return -ENODEV;
} }
...@@ -461,8 +461,8 @@ static int __init ircc_open(unsigned int fir_base, unsigned int sir_base) ...@@ -461,8 +461,8 @@ static int __init ircc_open(unsigned int fir_base, unsigned int sir_base)
dma = config & 0x0f; dma = config & 0x0f;
if (high != 0x10 || low != 0xb8 || (chip != 0xf1 && chip != 0xf2)) { if (high != 0x10 || low != 0xb8 || (chip != 0xf1 && chip != 0xf2)) {
IRDA_DEBUG(0, __FUNCTION__ IRDA_DEBUG(0,
"(), addr 0x%04x - no device found!\n", fir_base); "%s(), addr 0x%04x - no device found!\n", __FUNCTION__ , fir_base);
return -ENODEV; return -ENODEV;
} }
MESSAGE("SMC IrDA Controller found\n IrCC version %d.%d, " MESSAGE("SMC IrDA Controller found\n IrCC version %d.%d, "
...@@ -470,8 +470,8 @@ static int __init ircc_open(unsigned int fir_base, unsigned int sir_base) ...@@ -470,8 +470,8 @@ static int __init ircc_open(unsigned int fir_base, unsigned int sir_base)
chip & 0x0f, version, fir_base, sir_base, dma, irq); chip & 0x0f, version, fir_base, sir_base, dma, irq);
if (dev_count>DIM(dev_self)) { if (dev_count>DIM(dev_self)) {
IRDA_DEBUG(0, __FUNCTION__ IRDA_DEBUG(0,
"(), to many devices!\n"); "%s(), to many devices!\n", __FUNCTION__ );
return -ENOMEM; return -ENOMEM;
} }
...@@ -610,7 +610,7 @@ static void ircc_change_speed(void *priv, u32 speed) ...@@ -610,7 +610,7 @@ static void ircc_change_speed(void *priv, u32 speed)
struct ircc_cb *self = (struct ircc_cb *) priv; struct ircc_cb *self = (struct ircc_cb *) priv;
struct net_device *dev; struct net_device *dev;
IRDA_DEBUG(0, __FUNCTION__ "\n"); IRDA_DEBUG(0, "%s\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
...@@ -625,7 +625,7 @@ static void ircc_change_speed(void *priv, u32 speed) ...@@ -625,7 +625,7 @@ static void ircc_change_speed(void *priv, u32 speed)
switch (speed) { switch (speed) {
default: default:
IRDA_DEBUG(0, __FUNCTION__ "(), unknown baud rate of %d\n", IRDA_DEBUG(0, "%s(), unknown baud rate of %d\n", __FUNCTION__ ,
speed); speed);
/* FALLTHROUGH */ /* FALLTHROUGH */
case 9600: case 9600:
...@@ -641,19 +641,19 @@ static void ircc_change_speed(void *priv, u32 speed) ...@@ -641,19 +641,19 @@ static void ircc_change_speed(void *priv, u32 speed)
ir_mode = IRCC_CFGA_IRDA_HDLC; ir_mode = IRCC_CFGA_IRDA_HDLC;
ctrl = IRCC_CRC; ctrl = IRCC_CRC;
fast = 0; fast = 0;
IRDA_DEBUG(0, __FUNCTION__ "(), handling baud of 576000\n"); IRDA_DEBUG(0, "%s(), handling baud of 576000\n", __FUNCTION__ );
break; break;
case 1152000: case 1152000:
ir_mode = IRCC_CFGA_IRDA_HDLC; ir_mode = IRCC_CFGA_IRDA_HDLC;
ctrl = IRCC_1152 | IRCC_CRC; ctrl = IRCC_1152 | IRCC_CRC;
fast = 0; fast = 0;
IRDA_DEBUG(0, __FUNCTION__ "(), handling baud of 1152000\n"); IRDA_DEBUG(0, "%s(), handling baud of 1152000\n", __FUNCTION__ );
break; break;
case 4000000: case 4000000:
ir_mode = IRCC_CFGA_IRDA_4PPM; ir_mode = IRCC_CFGA_IRDA_4PPM;
ctrl = IRCC_CRC; ctrl = IRCC_CRC;
fast = IRCC_LCR_A_FAST; fast = IRCC_LCR_A_FAST;
IRDA_DEBUG(0, __FUNCTION__ "(), handling baud of 4000000\n"); IRDA_DEBUG(0, "%s(), handling baud of 4000000\n", __FUNCTION__ );
break; break;
} }
...@@ -683,8 +683,8 @@ static void ircc_change_speed(void *priv, u32 speed) ...@@ -683,8 +683,8 @@ static void ircc_change_speed(void *priv, u32 speed)
/* No need to lock, already locked - Jean II */ /* No need to lock, already locked - Jean II */
irport_start(self->irport); irport_start(self->irport);
IRDA_DEBUG(0, __FUNCTION__ IRDA_DEBUG(0,
"(), using irport to change speed to %d\n", speed); "%s(), using irport to change speed to %d\n", __FUNCTION__ , speed);
irport_change_speed(self->irport, speed); irport_change_speed(self->irport, speed);
} }
...@@ -792,7 +792,7 @@ static void ircc_dma_xmit(struct ircc_cb *self, int iobase, int bofs) ...@@ -792,7 +792,7 @@ static void ircc_dma_xmit(struct ircc_cb *self, int iobase, int bofs)
{ {
u8 ctrl; u8 ctrl;
IRDA_DEBUG(2, __FUNCTION__ "\n"); IRDA_DEBUG(2, "%s\n", __FUNCTION__ );
#if 0 #if 0
/* Disable Rx */ /* Disable Rx */
register_bank(iobase, 0); register_bank(iobase, 0);
...@@ -842,7 +842,7 @@ static void ircc_dma_xmit(struct ircc_cb *self, int iobase, int bofs) ...@@ -842,7 +842,7 @@ static void ircc_dma_xmit(struct ircc_cb *self, int iobase, int bofs)
*/ */
static void ircc_dma_xmit_complete(struct ircc_cb *self, int iobase) static void ircc_dma_xmit_complete(struct ircc_cb *self, int iobase)
{ {
IRDA_DEBUG(2, __FUNCTION__ "\n"); IRDA_DEBUG(2, "%s\n", __FUNCTION__ );
#if 0 #if 0
/* Disable Tx */ /* Disable Tx */
register_bank(iobase, 0); register_bank(iobase, 0);
...@@ -928,7 +928,7 @@ static void ircc_dma_receive_complete(struct ircc_cb *self, int iobase) ...@@ -928,7 +928,7 @@ static void ircc_dma_receive_complete(struct ircc_cb *self, int iobase)
struct sk_buff *skb; struct sk_buff *skb;
int len, msgcnt; int len, msgcnt;
IRDA_DEBUG(2, __FUNCTION__ "\n"); IRDA_DEBUG(2, "%s\n", __FUNCTION__ );
#if 0 #if 0
/* Disable Rx */ /* Disable Rx */
register_bank(iobase, 0); register_bank(iobase, 0);
...@@ -937,7 +937,7 @@ static void ircc_dma_receive_complete(struct ircc_cb *self, int iobase) ...@@ -937,7 +937,7 @@ static void ircc_dma_receive_complete(struct ircc_cb *self, int iobase)
register_bank(iobase, 0); register_bank(iobase, 0);
msgcnt = inb(iobase+IRCC_LCR_B) & 0x08; msgcnt = inb(iobase+IRCC_LCR_B) & 0x08;
IRDA_DEBUG(2, __FUNCTION__ ": dma count = %d\n", IRDA_DEBUG(2, "%s: dma count = %d\n", __FUNCTION__ ,
get_dma_residue(self->io->dma)); get_dma_residue(self->io->dma));
len = self->rx_buff.truesize - get_dma_residue(self->io->dma); len = self->rx_buff.truesize - get_dma_residue(self->io->dma);
...@@ -952,7 +952,7 @@ static void ircc_dma_receive_complete(struct ircc_cb *self, int iobase) ...@@ -952,7 +952,7 @@ static void ircc_dma_receive_complete(struct ircc_cb *self, int iobase)
WARNING("%s(), bogus len=%d\n", __FUNCTION__, 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, "%s: msgcnt = %d, len=%d\n", __FUNCTION__ , msgcnt, len);
skb = dev_alloc_skb(len+1); skb = dev_alloc_skb(len+1);
if (!skb) { if (!skb) {
...@@ -1012,7 +1012,7 @@ static void ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -1012,7 +1012,7 @@ static void ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
/* Disable interrupts */ /* Disable interrupts */
outb(0, iobase+IRCC_IER); outb(0, iobase+IRCC_IER);
IRDA_DEBUG(2, __FUNCTION__ "(), iir = 0x%02x\n", iir); IRDA_DEBUG(2, "%s(), iir = 0x%02x\n", __FUNCTION__ , iir);
if (iir & IRCC_IIR_EOM) { if (iir & IRCC_IIR_EOM) {
if (self->io->direction == IO_RECV) if (self->io->direction == IO_RECV)
...@@ -1042,11 +1042,11 @@ static int ircc_is_receiving(struct ircc_cb *self) ...@@ -1042,11 +1042,11 @@ static int ircc_is_receiving(struct ircc_cb *self)
int status = FALSE; int status = FALSE;
/* int iobase; */ /* int iobase; */
IRDA_DEBUG(0, __FUNCTION__ "\n"); IRDA_DEBUG(0, "%s\n", __FUNCTION__ );
ASSERT(self != NULL, return FALSE;); ASSERT(self != NULL, return FALSE;);
IRDA_DEBUG(0, __FUNCTION__ ": dma count = %d\n", IRDA_DEBUG(0, "%s: dma count = %d\n", __FUNCTION__ ,
get_dma_residue(self->io->dma)); get_dma_residue(self->io->dma));
status = (self->rx_buff.state != OUTSIDE_FRAME); status = (self->rx_buff.state != OUTSIDE_FRAME);
...@@ -1067,7 +1067,7 @@ static int ircc_net_open(struct net_device *dev) ...@@ -1067,7 +1067,7 @@ static int ircc_net_open(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;
...@@ -1180,7 +1180,7 @@ static int __exit ircc_close(struct ircc_cb *self) ...@@ -1180,7 +1180,7 @@ static int __exit ircc_close(struct ircc_cb *self)
{ {
int iobase; int iobase;
IRDA_DEBUG(0, __FUNCTION__ "\n"); IRDA_DEBUG(0, "%s\n", __FUNCTION__ );
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
...@@ -1202,7 +1202,7 @@ static int __exit ircc_close(struct ircc_cb *self) ...@@ -1202,7 +1202,7 @@ static int __exit ircc_close(struct ircc_cb *self)
#endif #endif
/* Release the PORT that this driver is using */ /* Release the PORT that this driver is using */
IRDA_DEBUG(0, __FUNCTION__ "(), releasing 0x%03x\n", iobase); IRDA_DEBUG(0, "%s(), releasing 0x%03x\n", __FUNCTION__ , iobase);
release_region(iobase, CHIP_IO_EXTENT); release_region(iobase, CHIP_IO_EXTENT);
...@@ -1226,7 +1226,7 @@ void __exit smc_cleanup(void) ...@@ -1226,7 +1226,7 @@ void __exit smc_cleanup(void)
{ {
int i; int i;
IRDA_DEBUG(0, __FUNCTION__ "\n"); IRDA_DEBUG(0, "%s\n", __FUNCTION__ );
for (i=0; i < 2; i++) { for (i=0; i < 2; i++) {
if (dev_self[i]) if (dev_self[i])
......
...@@ -66,7 +66,7 @@ void __exit tekram_cleanup(void) ...@@ -66,7 +66,7 @@ void __exit tekram_cleanup(void)
static void tekram_open(dongle_t *self, struct qos_info *qos) static void tekram_open(dongle_t *self, struct qos_info *qos)
{ {
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
qos->baud_rate.bits &= IR_9600|IR_19200|IR_38400|IR_57600|IR_115200; qos->baud_rate.bits &= IR_9600|IR_19200|IR_38400|IR_57600|IR_115200;
qos->min_turn_time.bits = 0x01; /* Needs at least 10 ms */ qos->min_turn_time.bits = 0x01; /* Needs at least 10 ms */
...@@ -77,7 +77,7 @@ static void tekram_open(dongle_t *self, struct qos_info *qos) ...@@ -77,7 +77,7 @@ static void tekram_open(dongle_t *self, struct qos_info *qos)
static void tekram_close(dongle_t *self) static void tekram_close(dongle_t *self)
{ {
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
/* Power off dongle */ /* Power off dongle */
self->set_dtr_rts(self->dev, FALSE, FALSE); self->set_dtr_rts(self->dev, FALSE, FALSE);
...@@ -113,12 +113,12 @@ static int tekram_change_speed(struct irda_task *task) ...@@ -113,12 +113,12 @@ static int tekram_change_speed(struct irda_task *task)
__u8 byte; __u8 byte;
int ret = 0; int ret = 0;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(task != NULL, return -1;); ASSERT(task != NULL, return -1;);
if (self->speed_task && self->speed_task != task) { if (self->speed_task && self->speed_task != task) {
IRDA_DEBUG(0, __FUNCTION__ "(), busy!\n"); IRDA_DEBUG(0, "%s(), busy!\n", __FUNCTION__ );
return MSECS_TO_JIFFIES(10); return MSECS_TO_JIFFIES(10);
} else } else
self->speed_task = task; self->speed_task = task;
...@@ -214,12 +214,12 @@ int tekram_reset(struct irda_task *task) ...@@ -214,12 +214,12 @@ int tekram_reset(struct irda_task *task)
dongle_t *self = (dongle_t *) task->instance; dongle_t *self = (dongle_t *) task->instance;
int ret = 0; int ret = 0;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(task != NULL, return -1;); ASSERT(task != NULL, return -1;);
if (self->reset_task && self->reset_task != task) { if (self->reset_task && self->reset_task != task) {
IRDA_DEBUG(0, __FUNCTION__ "(), busy!\n"); IRDA_DEBUG(0, "%s(), busy!\n", __FUNCTION__ );
return MSECS_TO_JIFFIES(10); return MSECS_TO_JIFFIES(10);
} else } else
self->reset_task = task; self->reset_task = task;
......
...@@ -92,7 +92,7 @@ static int max_baud = 4000000; ...@@ -92,7 +92,7 @@ static int max_baud = 4000000;
static void static void
toshoboe_stopchip (struct toshoboe_cb *self) toshoboe_stopchip (struct toshoboe_cb *self)
{ {
IRDA_DEBUG (4, __FUNCTION__ "()\n"); IRDA_DEBUG (4, "%s()\n", __FUNCTION__ );
outb_p (0x0e, OBOE_REG_11); outb_p (0x0e, OBOE_REG_11);
...@@ -113,7 +113,7 @@ static void ...@@ -113,7 +113,7 @@ static void
toshoboe_setbaud (struct toshoboe_cb *self, int baud) toshoboe_setbaud (struct toshoboe_cb *self, int baud)
{ {
unsigned long flags; unsigned long flags;
IRDA_DEBUG (4, __FUNCTION__ "()\n"); IRDA_DEBUG (4, "%s()\n", __FUNCTION__ );
printk (KERN_WARNING "ToshOboe: setting baud to %d\n", baud); printk (KERN_WARNING "ToshOboe: setting baud to %d\n", baud);
...@@ -183,7 +183,7 @@ toshoboe_startchip (struct toshoboe_cb *self) ...@@ -183,7 +183,7 @@ toshoboe_startchip (struct toshoboe_cb *self)
{ {
__u32 physaddr; __u32 physaddr;
IRDA_DEBUG (4, __FUNCTION__ "()\n"); IRDA_DEBUG (4, "%s()\n", __FUNCTION__ );
outb_p (0, OBOE_LOCK); outb_p (0, OBOE_LOCK);
...@@ -212,7 +212,7 @@ toshoboe_startchip (struct toshoboe_cb *self) ...@@ -212,7 +212,7 @@ toshoboe_startchip (struct toshoboe_cb *self)
static void static void
toshoboe_enablebm (struct toshoboe_cb *self) toshoboe_enablebm (struct toshoboe_cb *self)
{ {
IRDA_DEBUG (4, __FUNCTION__ "()\n"); IRDA_DEBUG (4, "%s()\n", __FUNCTION__ );
pci_set_master (self->pdev); pci_set_master (self->pdev);
} }
...@@ -221,7 +221,7 @@ static void ...@@ -221,7 +221,7 @@ static void
toshoboe_disablebm (struct toshoboe_cb *self) toshoboe_disablebm (struct toshoboe_cb *self)
{ {
__u8 command; __u8 command;
IRDA_DEBUG (4, __FUNCTION__ "()\n"); IRDA_DEBUG (4, "%s()\n", __FUNCTION__ );
pci_read_config_byte (self->pdev, PCI_COMMAND, &command); pci_read_config_byte (self->pdev, PCI_COMMAND, &command);
command &= ~PCI_COMMAND_MASTER; command &= ~PCI_COMMAND_MASTER;
...@@ -236,7 +236,7 @@ toshoboe_initbuffs (struct toshoboe_cb *self) ...@@ -236,7 +236,7 @@ toshoboe_initbuffs (struct toshoboe_cb *self)
int i; int i;
unsigned long flags; unsigned long flags;
IRDA_DEBUG (4, __FUNCTION__ "()\n"); IRDA_DEBUG (4, "%s()\n", __FUNCTION__ );
save_flags (flags); save_flags (flags);
cli (); cli ();
...@@ -363,7 +363,7 @@ toshoboe_interrupt (int irq, void *dev_id, struct pt_regs *regs) ...@@ -363,7 +363,7 @@ toshoboe_interrupt (int irq, void *dev_id, struct pt_regs *regs)
return; return;
} }
IRDA_DEBUG (4, __FUNCTION__ "()\n"); IRDA_DEBUG (4, "%s()\n", __FUNCTION__ );
irqstat = inb_p (OBOE_ISR); irqstat = inb_p (OBOE_ISR);
...@@ -463,7 +463,7 @@ toshoboe_interrupt (int irq, void *dev_id, struct pt_regs *regs) ...@@ -463,7 +463,7 @@ toshoboe_interrupt (int irq, void *dev_id, struct pt_regs *regs)
static int static int
toshoboe_net_init (struct net_device *dev) toshoboe_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 */ /* Setup to be a normal IrDA network device driver */
irda_device_setup (dev); irda_device_setup (dev);
...@@ -512,7 +512,7 @@ toshoboe_net_open (struct net_device *dev) ...@@ -512,7 +512,7 @@ toshoboe_net_open (struct net_device *dev)
struct toshoboe_cb *self; struct toshoboe_cb *self;
char hwname[32]; char hwname[32];
IRDA_DEBUG (4, __FUNCTION__ "()\n"); IRDA_DEBUG (4, "%s()\n", __FUNCTION__ );
ASSERT (dev != NULL, return -1; ASSERT (dev != NULL, return -1;
); );
...@@ -559,7 +559,7 @@ toshoboe_net_close (struct net_device *dev) ...@@ -559,7 +559,7 @@ toshoboe_net_close (struct net_device *dev)
{ {
struct toshoboe_cb *self; struct toshoboe_cb *self;
IRDA_DEBUG (4, __FUNCTION__ "()\n"); IRDA_DEBUG (4, "%s()\n", __FUNCTION__ );
ASSERT (dev != NULL, return -1; ASSERT (dev != NULL, return -1;
); );
...@@ -608,7 +608,7 @@ static int toshoboe_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -608,7 +608,7 @@ static int toshoboe_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);
/* Disable interrupts & save flags */ /* Disable interrupts & save flags */
save_flags(flags); save_flags(flags);
...@@ -654,7 +654,7 @@ toshoboe_remove (struct pci_dev *pci_dev) ...@@ -654,7 +654,7 @@ toshoboe_remove (struct pci_dev *pci_dev)
int i; int i;
struct toshoboe_cb *self = (struct toshoboe_cb*)pci_get_drvdata(pci_dev); struct toshoboe_cb *self = (struct toshoboe_cb*)pci_get_drvdata(pci_dev);
IRDA_DEBUG (4, __FUNCTION__ "()\n"); IRDA_DEBUG (4, "%s()\n", __FUNCTION__ );
ASSERT (self != NULL, return; ASSERT (self != NULL, return;
); );
...@@ -704,7 +704,7 @@ toshoboe_probe (struct pci_dev *pci_dev, const struct pci_device_id *pdid) ...@@ -704,7 +704,7 @@ toshoboe_probe (struct pci_dev *pci_dev, const struct pci_device_id *pdid)
int ok = 0; int ok = 0;
int err; int err;
IRDA_DEBUG (4, __FUNCTION__ "()\n"); IRDA_DEBUG (4, "%s()\n", __FUNCTION__ );
if ((err=pci_enable_device(pci_dev))) if ((err=pci_enable_device(pci_dev)))
return err; return err;
...@@ -733,7 +733,7 @@ toshoboe_probe (struct pci_dev *pci_dev, const struct pci_device_id *pdid) ...@@ -733,7 +733,7 @@ toshoboe_probe (struct pci_dev *pci_dev, const struct pci_device_id *pdid)
/* Lock the port that we need */ /* Lock the port that we need */
if (NULL==request_region (self->io.sir_base, self->io.sir_ext, driver_name)) if (NULL==request_region (self->io.sir_base, self->io.sir_ext, driver_name))
{ {
IRDA_DEBUG (0, __FUNCTION__ "(), can't get iobase of 0x%03x\n", IRDA_DEBUG (0, "%s(), can't get iobase of 0x%03x\n", __FUNCTION__ ,
self->io.sir_base); self->io.sir_base);
err = -EBUSY; err = -EBUSY;
......
...@@ -116,7 +116,7 @@ int __init w83977af_init(void) ...@@ -116,7 +116,7 @@ int __init w83977af_init(void)
{ {
int i; int i;
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
for (i=0; (io[i] < 2000) && (i < 4); i++) { for (i=0; (io[i] < 2000) && (i < 4); i++) {
int ioaddr = io[i]; int ioaddr = io[i];
...@@ -138,7 +138,7 @@ void __exit w83977af_cleanup(void) ...@@ -138,7 +138,7 @@ void __exit w83977af_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])
...@@ -160,7 +160,7 @@ int w83977af_open(int i, unsigned int iobase, unsigned int irq, ...@@ -160,7 +160,7 @@ int w83977af_open(int i, unsigned int iobase, unsigned int irq,
void *ret; void *ret;
int err; int err;
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
if (w83977af_probe(iobase, irq, dma) == -1) if (w83977af_probe(iobase, irq, dma) == -1)
return -1; return -1;
...@@ -190,8 +190,8 @@ int w83977af_open(int i, unsigned int iobase, unsigned int irq, ...@@ -190,8 +190,8 @@ int w83977af_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.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) {
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.fir_base); __FUNCTION__ , self->io.fir_base);
/* w83977af_cleanup( self); */ /* w83977af_cleanup( self); */
return -ENODEV; return -ENODEV;
} }
...@@ -273,7 +273,7 @@ static int w83977af_close(struct w83977af_ir *self) ...@@ -273,7 +273,7 @@ static int w83977af_close(struct w83977af_ir *self)
{ {
int iobase; int iobase;
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
iobase = self->io.fir_base; iobase = self->io.fir_base;
...@@ -297,8 +297,8 @@ static int w83977af_close(struct w83977af_ir *self) ...@@ -297,8 +297,8 @@ static int w83977af_close(struct w83977af_ir *self)
} }
/* Release the PORT that this driver is using */ /* Release the PORT that this driver is using */
IRDA_DEBUG(0 , __FUNCTION__ "(), Releasing Region %03x\n", IRDA_DEBUG(0 , "%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)
...@@ -318,7 +318,7 @@ int w83977af_probe( int iobase, int irq, int dma) ...@@ -318,7 +318,7 @@ int w83977af_probe( int iobase, int irq, int dma)
int i; int i;
for (i=0; i < 2; i++) { for (i=0; i < 2; i++) {
IRDA_DEBUG( 0, __FUNCTION__ "()\n"); IRDA_DEBUG( 0, "%s()\n", __FUNCTION__ );
#ifdef CONFIG_USE_W977_PNP #ifdef CONFIG_USE_W977_PNP
/* Enter PnP configuration mode */ /* Enter PnP configuration mode */
w977_efm_enter(efbase[i]); w977_efm_enter(efbase[i]);
...@@ -405,7 +405,7 @@ int w83977af_probe( int iobase, int irq, int dma) ...@@ -405,7 +405,7 @@ int w83977af_probe( int iobase, int irq, int dma)
return 0; return 0;
} else { } else {
/* Try next extented function register address */ /* Try next extented function register address */
IRDA_DEBUG( 0, __FUNCTION__ "(), Wrong chip version"); IRDA_DEBUG( 0, "%s(), Wrong chip version", __FUNCTION__ );
} }
} }
return -1; return -1;
...@@ -441,19 +441,19 @@ void w83977af_change_speed(struct w83977af_ir *self, __u32 speed) ...@@ -441,19 +441,19 @@ void w83977af_change_speed(struct w83977af_ir *self, __u32 speed)
case 115200: outb(0x01, iobase+ABLL); break; case 115200: outb(0x01, iobase+ABLL); break;
case 576000: case 576000:
ir_mode = HCR_MIR_576; ir_mode = HCR_MIR_576;
IRDA_DEBUG(0, __FUNCTION__ "(), handling baud of 576000\n"); IRDA_DEBUG(0, "%s(), handling baud of 576000\n", __FUNCTION__ );
break; break;
case 1152000: case 1152000:
ir_mode = HCR_MIR_1152; ir_mode = HCR_MIR_1152;
IRDA_DEBUG(0, __FUNCTION__ "(), handling baud of 1152000\n"); IRDA_DEBUG(0, "%s(), handling baud of 1152000\n", __FUNCTION__ );
break; break;
case 4000000: case 4000000:
ir_mode = HCR_FIR; ir_mode = HCR_FIR;
IRDA_DEBUG(0, __FUNCTION__ "(), handling baud of 4000000\n"); IRDA_DEBUG(0, "%s(), handling baud of 4000000\n", __FUNCTION__ );
break; break;
default: default:
ir_mode = HCR_FIR; ir_mode = HCR_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; break;
} }
...@@ -503,7 +503,7 @@ int w83977af_hard_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -503,7 +503,7 @@ int w83977af_hard_xmit(struct sk_buff *skb, struct net_device *dev)
iobase = self->io.fir_base; iobase = self->io.fir_base;
IRDA_DEBUG(4, __FUNCTION__ "(%ld), skb->len=%d\n", jiffies, IRDA_DEBUG(4, "%s(%ld), skb->len=%d\n", __FUNCTION__ , jiffies,
(int) skb->len); (int) skb->len);
/* Lock transmit buffer */ /* Lock transmit buffer */
...@@ -550,7 +550,7 @@ int w83977af_hard_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -550,7 +550,7 @@ int w83977af_hard_xmit(struct sk_buff *skb, struct net_device *dev)
outb(ICR_ETMRI, iobase+ICR); outb(ICR_ETMRI, iobase+ICR);
} else { } else {
#endif #endif
IRDA_DEBUG(4,__FUNCTION__ "(%ld), mtt=%d\n", jiffies, mtt); IRDA_DEBUG(4, "%s(%ld), mtt=%d\n", __FUNCTION__ , jiffies, mtt);
if (mtt) if (mtt)
udelay(mtt); udelay(mtt);
...@@ -591,7 +591,7 @@ static void w83977af_dma_write(struct w83977af_ir *self, int iobase) ...@@ -591,7 +591,7 @@ static void w83977af_dma_write(struct w83977af_ir *self, int iobase)
unsigned long flags; unsigned long flags;
__u8 hcr; __u8 hcr;
#endif #endif
IRDA_DEBUG(4, __FUNCTION__ "(), len=%d\n", self->tx_buff.len); IRDA_DEBUG(4, "%s(), len=%d\n", __FUNCTION__ , self->tx_buff.len);
/* Save current set */ /* Save current set */
set = inb(iobase+SSR); set = inb(iobase+SSR);
...@@ -643,19 +643,19 @@ static int w83977af_pio_write(int iobase, __u8 *buf, int len, int fifo_size) ...@@ -643,19 +643,19 @@ static int w83977af_pio_write(int iobase, __u8 *buf, int len, int fifo_size)
int actual = 0; int actual = 0;
__u8 set; __u8 set;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
/* Save current bank */ /* Save current bank */
set = inb(iobase+SSR); set = inb(iobase+SSR);
switch_bank(iobase, SET0); switch_bank(iobase, SET0);
if (!(inb_p(iobase+USR) & USR_TSRE)) { if (!(inb_p(iobase+USR) & USR_TSRE)) {
IRDA_DEBUG(4, __FUNCTION__ IRDA_DEBUG(4,
"(), warning, FIFO not empty yet!\n"); "%s(), warning, FIFO not empty yet!\n", __FUNCTION__ );
fifo_size -= 17; fifo_size -= 17;
IRDA_DEBUG(4, __FUNCTION__ "%d bytes left in tx fifo\n", IRDA_DEBUG(4, "%s(), %d bytes left in tx fifo\n",
fifo_size); __FUNCTION__ , fifo_size);
} }
/* Fill FIFO with current frame */ /* Fill FIFO with current frame */
...@@ -664,8 +664,8 @@ static int w83977af_pio_write(int iobase, __u8 *buf, int len, int fifo_size) ...@@ -664,8 +664,8 @@ static int w83977af_pio_write(int iobase, __u8 *buf, int len, int fifo_size)
outb(buf[actual++], iobase+TBR); outb(buf[actual++], iobase+TBR);
} }
IRDA_DEBUG(4, __FUNCTION__ "(), fifo_size %d ; %d sent of %d\n", IRDA_DEBUG(4, "%s(), fifo_size %d ; %d sent of %d\n",
fifo_size, actual, len); __FUNCTION__ , fifo_size, actual, len);
/* Restore bank */ /* Restore bank */
outb(set, iobase+SSR); outb(set, iobase+SSR);
...@@ -685,7 +685,7 @@ void w83977af_dma_xmit_complete(struct w83977af_ir *self) ...@@ -685,7 +685,7 @@ void w83977af_dma_xmit_complete(struct w83977af_ir *self)
int iobase; int iobase;
__u8 set; __u8 set;
IRDA_DEBUG(4, __FUNCTION__ "(%ld)\n", jiffies); IRDA_DEBUG(4, "%s(%ld)\n", __FUNCTION__ , jiffies);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
...@@ -700,7 +700,7 @@ void w83977af_dma_xmit_complete(struct w83977af_ir *self) ...@@ -700,7 +700,7 @@ void w83977af_dma_xmit_complete(struct w83977af_ir *self)
/* Check for underrrun! */ /* Check for underrrun! */
if (inb(iobase+AUDR) & AUDR_UNDR) { if (inb(iobase+AUDR) & AUDR_UNDR) {
IRDA_DEBUG(0, __FUNCTION__ "(), Transmit underrun!\n"); IRDA_DEBUG(0, "%s(), Transmit underrun!\n", __FUNCTION__ );
self->stats.tx_errors++; self->stats.tx_errors++;
self->stats.tx_fifo_errors++; self->stats.tx_fifo_errors++;
...@@ -741,7 +741,7 @@ int w83977af_dma_receive(struct w83977af_ir *self) ...@@ -741,7 +741,7 @@ int w83977af_dma_receive(struct w83977af_ir *self)
#endif #endif
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
IRDA_DEBUG(4, __FUNCTION__ "\n"); IRDA_DEBUG(4, "%s\n", __FUNCTION__ );
iobase= self->io.fir_base; iobase= self->io.fir_base;
...@@ -812,7 +812,7 @@ int w83977af_dma_receive_complete(struct w83977af_ir *self) ...@@ -812,7 +812,7 @@ int w83977af_dma_receive_complete(struct w83977af_ir *self)
__u8 set; __u8 set;
__u8 status; __u8 status;
IRDA_DEBUG(4, __FUNCTION__ "\n"); IRDA_DEBUG(4, "%s\n", __FUNCTION__ );
st_fifo = &self->st_fifo; st_fifo = &self->st_fifo;
...@@ -939,7 +939,7 @@ static void w83977af_pio_receive(struct w83977af_ir *self) ...@@ -939,7 +939,7 @@ static void w83977af_pio_receive(struct w83977af_ir *self)
__u8 byte = 0x00; __u8 byte = 0x00;
int iobase; int iobase;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
...@@ -966,7 +966,7 @@ static __u8 w83977af_sir_interrupt(struct w83977af_ir *self, int isr) ...@@ -966,7 +966,7 @@ static __u8 w83977af_sir_interrupt(struct w83977af_ir *self, int isr)
__u8 set; __u8 set;
int iobase; int iobase;
IRDA_DEBUG(4, __FUNCTION__ "(), isr=%#x\n", isr); IRDA_DEBUG(4, "%s(), isr=%#x\n", __FUNCTION__ , isr);
iobase = self->io.fir_base; iobase = self->io.fir_base;
/* Transmit FIFO low on data */ /* Transmit FIFO low on data */
...@@ -1002,8 +1002,8 @@ static __u8 w83977af_sir_interrupt(struct w83977af_ir *self, int isr) ...@@ -1002,8 +1002,8 @@ static __u8 w83977af_sir_interrupt(struct w83977af_ir *self, int isr)
if (isr & ISR_TXEMP_I) { if (isr & ISR_TXEMP_I) {
/* Check if we need to change the speed? */ /* Check if we need to change the speed? */
if (self->new_speed) { if (self->new_speed) {
IRDA_DEBUG(2, __FUNCTION__ IRDA_DEBUG(2,
"(), Changing speed!\n"); "%s(), Changing speed!\n", __FUNCTION__ );
w83977af_change_speed(self, self->new_speed); w83977af_change_speed(self, self->new_speed);
self->new_speed = 0; self->new_speed = 0;
} }
...@@ -1185,7 +1185,7 @@ static int w83977af_is_receiving(struct w83977af_ir *self) ...@@ -1185,7 +1185,7 @@ static int w83977af_is_receiving(struct w83977af_ir *self)
*/ */
static int w83977af_net_init(struct net_device *dev) static int w83977af_net_init(struct net_device *dev)
{ {
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
/* Set up to be a normal IrDA network device driver */ /* Set up to be a normal IrDA network device driver */
irda_device_setup(dev); irda_device_setup(dev);
...@@ -1209,7 +1209,7 @@ static int w83977af_net_open(struct net_device *dev) ...@@ -1209,7 +1209,7 @@ static int w83977af_net_open(struct net_device *dev)
char hwname[32]; char hwname[32];
__u8 set; __u8 set;
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
ASSERT(dev != NULL, return -1;); ASSERT(dev != NULL, return -1;);
self = (struct w83977af_ir *) dev->priv; self = (struct w83977af_ir *) dev->priv;
...@@ -1274,7 +1274,7 @@ static int w83977af_net_close(struct net_device *dev) ...@@ -1274,7 +1274,7 @@ static int w83977af_net_close(struct net_device *dev)
int iobase; int iobase;
__u8 set; __u8 set;
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
ASSERT(dev != NULL, return -1;); ASSERT(dev != NULL, return -1;);
...@@ -1331,7 +1331,7 @@ static int w83977af_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -1331,7 +1331,7 @@ static int w83977af_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);
spin_lock_irqsave(&self->lock, flags); spin_lock_irqsave(&self->lock, flags);
......
...@@ -78,7 +78,7 @@ int __init ircomm_init(void) ...@@ -78,7 +78,7 @@ int __init ircomm_init(void)
void __exit ircomm_cleanup(void) void __exit ircomm_cleanup(void)
{ {
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
hashbin_delete(ircomm, (FREE_FUNC) __ircomm_close); hashbin_delete(ircomm, (FREE_FUNC) __ircomm_close);
...@@ -98,7 +98,7 @@ struct ircomm_cb *ircomm_open(notify_t *notify, __u8 service_type, int line) ...@@ -98,7 +98,7 @@ struct ircomm_cb *ircomm_open(notify_t *notify, __u8 service_type, int line)
struct ircomm_cb *self = NULL; struct ircomm_cb *self = NULL;
int ret; int ret;
IRDA_DEBUG(2, __FUNCTION__ "(), service_type=0x%02x\n", IRDA_DEBUG(2, "%s(), service_type=0x%02x\n", __FUNCTION__ ,
service_type); service_type);
ASSERT(ircomm != NULL, return NULL;); ASSERT(ircomm != NULL, return NULL;);
...@@ -142,7 +142,7 @@ EXPORT_SYMBOL(ircomm_open); ...@@ -142,7 +142,7 @@ EXPORT_SYMBOL(ircomm_open);
*/ */
static int __ircomm_close(struct ircomm_cb *self) static int __ircomm_close(struct ircomm_cb *self)
{ {
IRDA_DEBUG(2, __FUNCTION__"()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
/* Disconnect link if any */ /* Disconnect link if any */
ircomm_do_event(self, IRCOMM_DISCONNECT_REQUEST, NULL, NULL); ircomm_do_event(self, IRCOMM_DISCONNECT_REQUEST, NULL, NULL);
...@@ -178,7 +178,7 @@ int ircomm_close(struct ircomm_cb *self) ...@@ -178,7 +178,7 @@ int ircomm_close(struct ircomm_cb *self)
ASSERT(self != NULL, return -EIO;); ASSERT(self != NULL, return -EIO;);
ASSERT(self->magic == IRCOMM_MAGIC, return -EIO;); ASSERT(self->magic == IRCOMM_MAGIC, return -EIO;);
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
entry = hashbin_remove(ircomm, self->line, NULL); entry = hashbin_remove(ircomm, self->line, NULL);
...@@ -203,7 +203,7 @@ int ircomm_connect_request(struct ircomm_cb *self, __u8 dlsap_sel, ...@@ -203,7 +203,7 @@ int ircomm_connect_request(struct ircomm_cb *self, __u8 dlsap_sel,
struct ircomm_info info; struct ircomm_info info;
int ret; int ret;
IRDA_DEBUG(2 , __FUNCTION__"()\n"); IRDA_DEBUG(2 , "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == IRCOMM_MAGIC, return -1;); ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
...@@ -232,7 +232,7 @@ void ircomm_connect_indication(struct ircomm_cb *self, struct sk_buff *skb, ...@@ -232,7 +232,7 @@ void ircomm_connect_indication(struct ircomm_cb *self, struct sk_buff *skb,
{ {
int clen = 0; int clen = 0;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
/* Check if the packet contains data on the control channel */ /* Check if the packet contains data on the control channel */
if (skb->len > 0) if (skb->len > 0)
...@@ -248,7 +248,7 @@ void ircomm_connect_indication(struct ircomm_cb *self, struct sk_buff *skb, ...@@ -248,7 +248,7 @@ void ircomm_connect_indication(struct ircomm_cb *self, struct sk_buff *skb,
info->qos, info->max_data_size, info->qos, info->max_data_size,
info->max_header_size, skb); info->max_header_size, skb);
else { else {
IRDA_DEBUG(0, __FUNCTION__ "(), missing handler\n"); IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ );
dev_kfree_skb(skb); dev_kfree_skb(skb);
} }
} }
...@@ -266,7 +266,7 @@ int ircomm_connect_response(struct ircomm_cb *self, struct sk_buff *userdata) ...@@ -266,7 +266,7 @@ int ircomm_connect_response(struct ircomm_cb *self, struct sk_buff *userdata)
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == IRCOMM_MAGIC, return -1;); ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ret = ircomm_do_event(self, IRCOMM_CONNECT_RESPONSE, userdata, NULL); ret = ircomm_do_event(self, IRCOMM_CONNECT_RESPONSE, userdata, NULL);
...@@ -284,7 +284,7 @@ EXPORT_SYMBOL(ircomm_connect_response); ...@@ -284,7 +284,7 @@ EXPORT_SYMBOL(ircomm_connect_response);
void ircomm_connect_confirm(struct ircomm_cb *self, struct sk_buff *skb, void ircomm_connect_confirm(struct ircomm_cb *self, struct sk_buff *skb,
struct ircomm_info *info) struct ircomm_info *info)
{ {
IRDA_DEBUG(4, __FUNCTION__"()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
if (self->notify.connect_confirm ) if (self->notify.connect_confirm )
self->notify.connect_confirm(self->notify.instance, self->notify.connect_confirm(self->notify.instance,
...@@ -292,7 +292,7 @@ void ircomm_connect_confirm(struct ircomm_cb *self, struct sk_buff *skb, ...@@ -292,7 +292,7 @@ void ircomm_connect_confirm(struct ircomm_cb *self, struct sk_buff *skb,
info->max_data_size, info->max_data_size,
info->max_header_size, skb); info->max_header_size, skb);
else { else {
IRDA_DEBUG(0, __FUNCTION__ "(), missing handler\n"); IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ );
dev_kfree_skb(skb); dev_kfree_skb(skb);
} }
} }
...@@ -307,7 +307,7 @@ int ircomm_data_request(struct ircomm_cb *self, struct sk_buff *skb) ...@@ -307,7 +307,7 @@ int ircomm_data_request(struct ircomm_cb *self, struct sk_buff *skb)
{ {
int ret; int ret;
IRDA_DEBUG(4, __FUNCTION__"()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return -EFAULT;); ASSERT(self != NULL, return -EFAULT;);
ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;); ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;);
...@@ -328,14 +328,14 @@ EXPORT_SYMBOL(ircomm_data_request); ...@@ -328,14 +328,14 @@ EXPORT_SYMBOL(ircomm_data_request);
*/ */
void ircomm_data_indication(struct ircomm_cb *self, struct sk_buff *skb) void ircomm_data_indication(struct ircomm_cb *self, struct sk_buff *skb)
{ {
IRDA_DEBUG(4, __FUNCTION__"()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(skb->len > 0, return;); ASSERT(skb->len > 0, return;);
if (self->notify.data_indication) if (self->notify.data_indication)
self->notify.data_indication(self->notify.instance, self, skb); self->notify.data_indication(self->notify.instance, self, skb);
else { else {
IRDA_DEBUG(0, __FUNCTION__ "(), missing handler\n"); IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ );
dev_kfree_skb(skb); dev_kfree_skb(skb);
} }
} }
...@@ -368,8 +368,8 @@ void ircomm_process_data(struct ircomm_cb *self, struct sk_buff *skb) ...@@ -368,8 +368,8 @@ void ircomm_process_data(struct ircomm_cb *self, struct sk_buff *skb)
if (skb->len) if (skb->len)
ircomm_data_indication(self, skb); ircomm_data_indication(self, skb);
else { else {
IRDA_DEBUG(4, __FUNCTION__ IRDA_DEBUG(4,
"(), data was control info only!\n"); "%s(), data was control info only!\n", __FUNCTION__ );
dev_kfree_skb(skb); dev_kfree_skb(skb);
} }
} }
...@@ -384,7 +384,7 @@ int ircomm_control_request(struct ircomm_cb *self, struct sk_buff *skb) ...@@ -384,7 +384,7 @@ int ircomm_control_request(struct ircomm_cb *self, struct sk_buff *skb)
{ {
int ret; int ret;
IRDA_DEBUG(2, __FUNCTION__"()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return -EFAULT;); ASSERT(self != NULL, return -EFAULT;);
ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;); ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;);
...@@ -408,7 +408,7 @@ static void ircomm_control_indication(struct ircomm_cb *self, ...@@ -408,7 +408,7 @@ static void ircomm_control_indication(struct ircomm_cb *self,
{ {
struct sk_buff *ctrl_skb; struct sk_buff *ctrl_skb;
IRDA_DEBUG(2, __FUNCTION__"()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ctrl_skb = skb_clone(skb, GFP_ATOMIC); ctrl_skb = skb_clone(skb, GFP_ATOMIC);
if (!ctrl_skb) if (!ctrl_skb)
...@@ -422,7 +422,7 @@ static void ircomm_control_indication(struct ircomm_cb *self, ...@@ -422,7 +422,7 @@ static void ircomm_control_indication(struct ircomm_cb *self,
self->notify.udata_indication(self->notify.instance, self, self->notify.udata_indication(self->notify.instance, self,
ctrl_skb); ctrl_skb);
else { else {
IRDA_DEBUG(0, __FUNCTION__ "(), missing handler\n"); IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ );
dev_kfree_skb(skb); dev_kfree_skb(skb);
} }
} }
...@@ -438,7 +438,7 @@ int ircomm_disconnect_request(struct ircomm_cb *self, struct sk_buff *userdata) ...@@ -438,7 +438,7 @@ int ircomm_disconnect_request(struct ircomm_cb *self, struct sk_buff *userdata)
struct ircomm_info info; struct ircomm_info info;
int ret; int ret;
IRDA_DEBUG(2, __FUNCTION__"()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == IRCOMM_MAGIC, return -1;); ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
...@@ -459,7 +459,7 @@ EXPORT_SYMBOL(ircomm_disconnect_request); ...@@ -459,7 +459,7 @@ EXPORT_SYMBOL(ircomm_disconnect_request);
void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb, void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb,
struct ircomm_info *info) struct ircomm_info *info)
{ {
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(info != NULL, return;); ASSERT(info != NULL, return;);
...@@ -467,7 +467,7 @@ void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb, ...@@ -467,7 +467,7 @@ void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb,
self->notify.disconnect_indication(self->notify.instance, self, self->notify.disconnect_indication(self->notify.instance, self,
info->reason, skb); info->reason, skb);
} else { } else {
IRDA_DEBUG(0, __FUNCTION__ "(), missing handler\n"); IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ );
dev_kfree_skb(skb); dev_kfree_skb(skb);
} }
} }
...@@ -480,7 +480,7 @@ void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb, ...@@ -480,7 +480,7 @@ void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb,
*/ */
void ircomm_flow_request(struct ircomm_cb *self, LOCAL_FLOW flow) void ircomm_flow_request(struct ircomm_cb *self, LOCAL_FLOW flow)
{ {
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_MAGIC, return;); ASSERT(self->magic == IRCOMM_MAGIC, return;);
......
...@@ -107,7 +107,7 @@ static int ircomm_state_idle(struct ircomm_cb *self, IRCOMM_EVENT event, ...@@ -107,7 +107,7 @@ static int ircomm_state_idle(struct ircomm_cb *self, IRCOMM_EVENT event,
ircomm_connect_indication(self, skb, info); ircomm_connect_indication(self, skb, info);
break; break;
default: default:
IRDA_DEBUG(4, __FUNCTION__"(), unknown event: %s\n", IRDA_DEBUG(4, "%s(), unknown event: %s\n", __FUNCTION__ ,
ircomm_event[event]); ircomm_event[event]);
if (skb) if (skb)
dev_kfree_skb(skb); dev_kfree_skb(skb);
...@@ -139,7 +139,7 @@ static int ircomm_state_waiti(struct ircomm_cb *self, IRCOMM_EVENT event, ...@@ -139,7 +139,7 @@ static int ircomm_state_waiti(struct ircomm_cb *self, IRCOMM_EVENT event,
ircomm_disconnect_indication(self, skb, info); ircomm_disconnect_indication(self, skb, info);
break; break;
default: default:
IRDA_DEBUG(0, __FUNCTION__"(), unknown event: %s\n", IRDA_DEBUG(0, "%s(), unknown event: %s\n", __FUNCTION__ ,
ircomm_event[event]); ircomm_event[event]);
if (skb) if (skb)
dev_kfree_skb(skb); dev_kfree_skb(skb);
...@@ -174,7 +174,7 @@ static int ircomm_state_waitr(struct ircomm_cb *self, IRCOMM_EVENT event, ...@@ -174,7 +174,7 @@ static int ircomm_state_waitr(struct ircomm_cb *self, IRCOMM_EVENT event,
ircomm_disconnect_indication(self, skb, info); ircomm_disconnect_indication(self, skb, info);
break; break;
default: default:
IRDA_DEBUG(0, __FUNCTION__ "(), unknown event = %s\n", IRDA_DEBUG(0, "%s(), unknown event = %s\n", __FUNCTION__ ,
ircomm_event[event]); ircomm_event[event]);
if (skb) if (skb)
dev_kfree_skb(skb); dev_kfree_skb(skb);
...@@ -218,7 +218,7 @@ static int ircomm_state_conn(struct ircomm_cb *self, IRCOMM_EVENT event, ...@@ -218,7 +218,7 @@ static int ircomm_state_conn(struct ircomm_cb *self, IRCOMM_EVENT event,
ret = self->issue.disconnect_request(self, skb, info); ret = self->issue.disconnect_request(self, skb, info);
break; break;
default: default:
IRDA_DEBUG(0, __FUNCTION__ "(), unknown event = %s\n", IRDA_DEBUG(0, "%s(), unknown event = %s\n", __FUNCTION__ ,
ircomm_event[event]); ircomm_event[event]);
if (skb) if (skb)
dev_kfree_skb(skb); dev_kfree_skb(skb);
...@@ -236,7 +236,7 @@ static int ircomm_state_conn(struct ircomm_cb *self, IRCOMM_EVENT event, ...@@ -236,7 +236,7 @@ static int ircomm_state_conn(struct ircomm_cb *self, IRCOMM_EVENT event,
int ircomm_do_event(struct ircomm_cb *self, IRCOMM_EVENT event, int ircomm_do_event(struct ircomm_cb *self, IRCOMM_EVENT event,
struct sk_buff *skb, struct ircomm_info *info) struct sk_buff *skb, struct ircomm_info *info)
{ {
IRDA_DEBUG(4, __FUNCTION__": state=%s, event=%s\n", IRDA_DEBUG(4, "%s: state=%s, event=%s\n", __FUNCTION__ ,
ircomm_state[self->state], ircomm_event[event]); ircomm_state[self->state], ircomm_event[event]);
return (*state[self->state])(self, event, skb, info); return (*state[self->state])(self, event, skb, info);
...@@ -252,6 +252,6 @@ void ircomm_next_state(struct ircomm_cb *self, IRCOMM_STATE state) ...@@ -252,6 +252,6 @@ void ircomm_next_state(struct ircomm_cb *self, IRCOMM_STATE state)
{ {
self->state = state; self->state = state;
IRDA_DEBUG(4, __FUNCTION__": next state=%s, service type=%d\n", IRDA_DEBUG(4, "%s: next state=%s, service type=%d\n", __FUNCTION__ ,
ircomm_state[self->state], self->service_type); ircomm_state[self->state], self->service_type);
} }
...@@ -50,7 +50,7 @@ int ircomm_open_lsap(struct ircomm_cb *self) ...@@ -50,7 +50,7 @@ int ircomm_open_lsap(struct ircomm_cb *self)
{ {
notify_t notify; notify_t notify;
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
/* Register callbacks */ /* Register callbacks */
irda_notify_init(&notify); irda_notify_init(&notify);
...@@ -63,7 +63,7 @@ int ircomm_open_lsap(struct ircomm_cb *self) ...@@ -63,7 +63,7 @@ int ircomm_open_lsap(struct ircomm_cb *self)
self->lsap = irlmp_open_lsap(LSAP_ANY, &notify, 0); self->lsap = irlmp_open_lsap(LSAP_ANY, &notify, 0);
if (!self->lsap) { if (!self->lsap) {
IRDA_DEBUG(0,__FUNCTION__"failed to allocate tsap\n"); IRDA_DEBUG(0,"%sfailed to allocate tsap\n", __FUNCTION__ );
return -1; return -1;
} }
self->slsap_sel = self->lsap->slsap_sel; self->slsap_sel = self->lsap->slsap_sel;
...@@ -91,7 +91,7 @@ int ircomm_lmp_connect_request(struct ircomm_cb *self, ...@@ -91,7 +91,7 @@ int ircomm_lmp_connect_request(struct ircomm_cb *self,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
ret = irlmp_connect_request(self->lsap, info->dlsap_sel, ret = irlmp_connect_request(self->lsap, info->dlsap_sel,
info->saddr, info->daddr, NULL, userdata); info->saddr, info->daddr, NULL, userdata);
...@@ -109,7 +109,7 @@ int ircomm_lmp_connect_response(struct ircomm_cb *self, struct sk_buff *userdata ...@@ -109,7 +109,7 @@ int ircomm_lmp_connect_response(struct ircomm_cb *self, struct sk_buff *userdata
struct sk_buff *skb; struct sk_buff *skb;
int ret; int ret;
IRDA_DEBUG(0, __FUNCTION__"()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
/* Any userdata supplied? */ /* Any userdata supplied? */
if (userdata == NULL) { if (userdata == NULL) {
...@@ -140,7 +140,7 @@ int ircomm_lmp_disconnect_request(struct ircomm_cb *self, ...@@ -140,7 +140,7 @@ int ircomm_lmp_disconnect_request(struct ircomm_cb *self,
struct sk_buff *skb; struct sk_buff *skb;
int ret; int ret;
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
if (!userdata) { if (!userdata) {
skb = dev_alloc_skb(64); skb = dev_alloc_skb(64);
...@@ -173,13 +173,13 @@ void ircomm_lmp_flow_control(struct sk_buff *skb) ...@@ -173,13 +173,13 @@ void ircomm_lmp_flow_control(struct sk_buff *skb)
cb = (struct irda_skb_cb *) skb->cb; cb = (struct irda_skb_cb *) skb->cb;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
line = cb->line; line = cb->line;
self = (struct ircomm_cb *) hashbin_lock_find(ircomm, line, NULL); self = (struct ircomm_cb *) hashbin_lock_find(ircomm, line, NULL);
if (!self) { if (!self) {
IRDA_DEBUG(2, __FUNCTION__ "(), didn't find myself\n"); IRDA_DEBUG(2, "%s(), didn't find myself\n", __FUNCTION__ );
return; return;
} }
...@@ -189,7 +189,7 @@ void ircomm_lmp_flow_control(struct sk_buff *skb) ...@@ -189,7 +189,7 @@ void ircomm_lmp_flow_control(struct sk_buff *skb)
self->pkt_count--; self->pkt_count--;
if ((self->pkt_count < 2) && (self->flow_status == FLOW_STOP)) { if ((self->pkt_count < 2) && (self->flow_status == FLOW_STOP)) {
IRDA_DEBUG(2, __FUNCTION__ "(), asking TTY to start again!\n"); IRDA_DEBUG(2, "%s(), asking TTY to start again!\n", __FUNCTION__ );
self->flow_status = FLOW_START; self->flow_status = FLOW_START;
if (self->notify.flow_indication) if (self->notify.flow_indication)
self->notify.flow_indication(self->notify.instance, self->notify.flow_indication(self->notify.instance,
...@@ -215,12 +215,12 @@ int ircomm_lmp_data_request(struct ircomm_cb *self, struct sk_buff *skb, ...@@ -215,12 +215,12 @@ int ircomm_lmp_data_request(struct ircomm_cb *self, struct sk_buff *skb,
cb->line = self->line; cb->line = self->line;
IRDA_DEBUG(4, __FUNCTION__"(), sending frame\n"); IRDA_DEBUG(4, "%s(), sending frame\n", __FUNCTION__ );
skb->destructor = ircomm_lmp_flow_control; skb->destructor = ircomm_lmp_flow_control;
if ((self->pkt_count++ > 7) && (self->flow_status == FLOW_START)) { if ((self->pkt_count++ > 7) && (self->flow_status == FLOW_START)) {
IRDA_DEBUG(2, __FUNCTION__ "(), asking TTY to slow down!\n"); IRDA_DEBUG(2, "%s(), asking TTY to slow down!\n", __FUNCTION__ );
self->flow_status = FLOW_STOP; self->flow_status = FLOW_STOP;
if (self->notify.flow_indication) if (self->notify.flow_indication)
self->notify.flow_indication(self->notify.instance, self->notify.flow_indication(self->notify.instance,
...@@ -246,7 +246,7 @@ int ircomm_lmp_data_indication(void *instance, void *sap, ...@@ -246,7 +246,7 @@ int ircomm_lmp_data_indication(void *instance, void *sap,
{ {
struct ircomm_cb *self = (struct ircomm_cb *) instance; struct ircomm_cb *self = (struct ircomm_cb *) instance;
IRDA_DEBUG(4, __FUNCTION__"()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == IRCOMM_MAGIC, return -1;); ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
...@@ -273,7 +273,7 @@ void ircomm_lmp_connect_confirm(void *instance, void *sap, ...@@ -273,7 +273,7 @@ void ircomm_lmp_connect_confirm(void *instance, void *sap,
struct ircomm_cb *self = (struct ircomm_cb *) instance; struct ircomm_cb *self = (struct ircomm_cb *) instance;
struct ircomm_info info; struct ircomm_info info;
IRDA_DEBUG(0, __FUNCTION__"()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_MAGIC, return;); ASSERT(self->magic == IRCOMM_MAGIC, return;);
...@@ -303,7 +303,7 @@ void ircomm_lmp_connect_indication(void *instance, void *sap, ...@@ -303,7 +303,7 @@ void ircomm_lmp_connect_indication(void *instance, void *sap,
struct ircomm_cb *self = (struct ircomm_cb *)instance; struct ircomm_cb *self = (struct ircomm_cb *)instance;
struct ircomm_info info; struct ircomm_info info;
IRDA_DEBUG(0, __FUNCTION__"()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_MAGIC, return;); ASSERT(self->magic == IRCOMM_MAGIC, return;);
...@@ -330,7 +330,7 @@ void ircomm_lmp_disconnect_indication(void *instance, void *sap, ...@@ -330,7 +330,7 @@ void ircomm_lmp_disconnect_indication(void *instance, void *sap,
struct ircomm_cb *self = (struct ircomm_cb *) instance; struct ircomm_cb *self = (struct ircomm_cb *) instance;
struct ircomm_info info; struct ircomm_info info;
IRDA_DEBUG(0, __FUNCTION__"()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_MAGIC, return;); ASSERT(self->magic == IRCOMM_MAGIC, return;);
......
...@@ -121,7 +121,7 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush) ...@@ -121,7 +121,7 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush)
struct sk_buff *skb; struct sk_buff *skb;
int count; int count;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
...@@ -162,7 +162,7 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush) ...@@ -162,7 +162,7 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush)
spin_unlock_irqrestore(&self->spinlock, flags); spin_unlock_irqrestore(&self->spinlock, flags);
IRDA_DEBUG(2, __FUNCTION__ "(), skb->len=%d\n", skb->len); IRDA_DEBUG(2, "%s(), skb->len=%d\n", __FUNCTION__ , skb->len);
if (flush) { if (flush) {
/* ircomm_tty_do_softint will take care of the rest */ /* ircomm_tty_do_softint will take care of the rest */
...@@ -197,11 +197,11 @@ static int ircomm_param_service_type(void *instance, irda_param_t *param, ...@@ -197,11 +197,11 @@ static int ircomm_param_service_type(void *instance, irda_param_t *param,
/* Find all common service types */ /* Find all common service types */
service_type &= self->service_type; service_type &= self->service_type;
if (!service_type) { if (!service_type) {
IRDA_DEBUG(2, __FUNCTION__ IRDA_DEBUG(2,
"(), No common service type to use!\n"); "%s(), No common service type to use!\n", __FUNCTION__ );
return -1; return -1;
} }
IRDA_DEBUG(0, __FUNCTION__ "(), services in common=%02x\n", IRDA_DEBUG(0, "%s(), services in common=%02x\n", __FUNCTION__ ,
service_type); service_type);
/* /*
...@@ -216,7 +216,7 @@ static int ircomm_param_service_type(void *instance, irda_param_t *param, ...@@ -216,7 +216,7 @@ static int ircomm_param_service_type(void *instance, irda_param_t *param,
else if (service_type & IRCOMM_3_WIRE_RAW) else if (service_type & IRCOMM_3_WIRE_RAW)
self->settings.service_type = IRCOMM_3_WIRE_RAW; self->settings.service_type = IRCOMM_3_WIRE_RAW;
IRDA_DEBUG(0, __FUNCTION__ "(), resulting service type=0x%02x\n", IRDA_DEBUG(0, "%s(), resulting service type=0x%02x\n", __FUNCTION__ ,
self->settings.service_type); self->settings.service_type);
/* /*
...@@ -252,7 +252,7 @@ static int ircomm_param_port_type(void *instance, irda_param_t *param, int get) ...@@ -252,7 +252,7 @@ static int ircomm_param_port_type(void *instance, irda_param_t *param, int get)
else { else {
self->settings.port_type = (__u8) param->pv.i; self->settings.port_type = (__u8) param->pv.i;
IRDA_DEBUG(0, __FUNCTION__ "(), port type=%d\n", IRDA_DEBUG(0, "%s(), port type=%d\n", __FUNCTION__ ,
self->settings.port_type); self->settings.port_type);
} }
return 0; return 0;
...@@ -272,9 +272,9 @@ static int ircomm_param_port_name(void *instance, irda_param_t *param, int get) ...@@ -272,9 +272,9 @@ static int ircomm_param_port_name(void *instance, irda_param_t *param, int get)
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
if (get) { if (get) {
IRDA_DEBUG(0, __FUNCTION__ "(), not imp!\n"); IRDA_DEBUG(0, "%s(), not imp!\n", __FUNCTION__ );
} else { } else {
IRDA_DEBUG(0, __FUNCTION__ "(), port-name=%s\n", param->pv.c); IRDA_DEBUG(0, "%s(), port-name=%s\n", __FUNCTION__ , param->pv.c);
strncpy(self->settings.port_name, param->pv.c, 32); strncpy(self->settings.port_name, param->pv.c, 32);
} }
...@@ -299,7 +299,7 @@ static int ircomm_param_data_rate(void *instance, irda_param_t *param, int get) ...@@ -299,7 +299,7 @@ static int ircomm_param_data_rate(void *instance, irda_param_t *param, int get)
else else
self->settings.data_rate = param->pv.i; self->settings.data_rate = param->pv.i;
IRDA_DEBUG(2, __FUNCTION__ "(), data rate = %d\n", param->pv.i); IRDA_DEBUG(2, "%s(), data rate = %d\n", __FUNCTION__ , param->pv.i);
return 0; return 0;
} }
...@@ -345,7 +345,7 @@ static int ircomm_param_flow_control(void *instance, irda_param_t *param, ...@@ -345,7 +345,7 @@ static int ircomm_param_flow_control(void *instance, irda_param_t *param,
else else
self->settings.flow_control = (__u8) param->pv.i; self->settings.flow_control = (__u8) param->pv.i;
IRDA_DEBUG(1, __FUNCTION__ "(), flow control = 0x%02x\n", (__u8) param->pv.i); IRDA_DEBUG(1, "%s(), flow control = 0x%02x\n", __FUNCTION__ , (__u8) param->pv.i);
return 0; return 0;
} }
...@@ -371,7 +371,7 @@ static int ircomm_param_xon_xoff(void *instance, irda_param_t *param, int get) ...@@ -371,7 +371,7 @@ static int ircomm_param_xon_xoff(void *instance, irda_param_t *param, int get)
self->settings.xonxoff[1] = (__u16) param->pv.i >> 8; self->settings.xonxoff[1] = (__u16) param->pv.i >> 8;
} }
IRDA_DEBUG(0, __FUNCTION__ "(), XON/XOFF = 0x%02x,0x%02x\n", IRDA_DEBUG(0, "%s(), XON/XOFF = 0x%02x,0x%02x\n", __FUNCTION__ ,
param->pv.i & 0xff, param->pv.i >> 8); param->pv.i & 0xff, param->pv.i >> 8);
return 0; return 0;
...@@ -398,7 +398,7 @@ static int ircomm_param_enq_ack(void *instance, irda_param_t *param, int get) ...@@ -398,7 +398,7 @@ static int ircomm_param_enq_ack(void *instance, irda_param_t *param, int get)
self->settings.enqack[1] = (__u16) param->pv.i >> 8; self->settings.enqack[1] = (__u16) param->pv.i >> 8;
} }
IRDA_DEBUG(0, __FUNCTION__ "(), ENQ/ACK = 0x%02x,0x%02x\n", IRDA_DEBUG(0, "%s(), ENQ/ACK = 0x%02x,0x%02x\n", __FUNCTION__ ,
param->pv.i & 0xff, param->pv.i >> 8); param->pv.i & 0xff, param->pv.i >> 8);
return 0; return 0;
...@@ -413,7 +413,7 @@ static int ircomm_param_enq_ack(void *instance, irda_param_t *param, int get) ...@@ -413,7 +413,7 @@ static int ircomm_param_enq_ack(void *instance, irda_param_t *param, int get)
static int ircomm_param_line_status(void *instance, irda_param_t *param, static int ircomm_param_line_status(void *instance, irda_param_t *param,
int get) int get)
{ {
IRDA_DEBUG(2, __FUNCTION__ "(), not impl.\n"); IRDA_DEBUG(2, "%s(), not impl.\n", __FUNCTION__ );
return 0; return 0;
} }
...@@ -472,7 +472,7 @@ static int ircomm_param_dce(void *instance, irda_param_t *param, int get) ...@@ -472,7 +472,7 @@ static int ircomm_param_dce(void *instance, irda_param_t *param, int get)
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
__u8 dce; __u8 dce;
IRDA_DEBUG(1, __FUNCTION__ "(), dce = 0x%02x\n", (__u8) param->pv.i); IRDA_DEBUG(1, "%s(), dce = 0x%02x\n", __FUNCTION__ , (__u8) param->pv.i);
dce = (__u8) param->pv.i; dce = (__u8) param->pv.i;
...@@ -484,7 +484,7 @@ static int ircomm_param_dce(void *instance, irda_param_t *param, int get) ...@@ -484,7 +484,7 @@ static int ircomm_param_dce(void *instance, irda_param_t *param, int get)
/* Check if any of the settings have changed */ /* Check if any of the settings have changed */
if (dce & 0x0f) { if (dce & 0x0f) {
if (dce & IRCOMM_DELTA_CTS) { if (dce & IRCOMM_DELTA_CTS) {
IRDA_DEBUG(2, __FUNCTION__ "(), CTS \n"); IRDA_DEBUG(2, "%s(), CTS \n", __FUNCTION__ );
} }
} }
......
...@@ -49,7 +49,7 @@ int ircomm_open_tsap(struct ircomm_cb *self) ...@@ -49,7 +49,7 @@ int ircomm_open_tsap(struct ircomm_cb *self)
{ {
notify_t notify; notify_t notify;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
/* Register callbacks */ /* Register callbacks */
irda_notify_init(&notify); irda_notify_init(&notify);
...@@ -64,7 +64,7 @@ int ircomm_open_tsap(struct ircomm_cb *self) ...@@ -64,7 +64,7 @@ int ircomm_open_tsap(struct ircomm_cb *self)
self->tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, self->tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT,
&notify); &notify);
if (!self->tsap) { if (!self->tsap) {
IRDA_DEBUG(0, __FUNCTION__"failed to allocate tsap\n"); IRDA_DEBUG(0, "%sfailed to allocate tsap\n", __FUNCTION__ );
return -1; return -1;
} }
self->slsap_sel = self->tsap->stsap_sel; self->slsap_sel = self->tsap->stsap_sel;
...@@ -92,7 +92,7 @@ int ircomm_ttp_connect_request(struct ircomm_cb *self, ...@@ -92,7 +92,7 @@ int ircomm_ttp_connect_request(struct ircomm_cb *self,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ret = irttp_connect_request(self->tsap, info->dlsap_sel, ret = irttp_connect_request(self->tsap, info->dlsap_sel,
info->saddr, info->daddr, NULL, info->saddr, info->daddr, NULL,
...@@ -110,7 +110,7 @@ int ircomm_ttp_connect_response(struct ircomm_cb *self, struct sk_buff *skb) ...@@ -110,7 +110,7 @@ int ircomm_ttp_connect_response(struct ircomm_cb *self, struct sk_buff *skb)
{ {
int ret; int ret;
IRDA_DEBUG(4, __FUNCTION__"()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ret = irttp_connect_response(self->tsap, TTP_SAR_DISABLE, skb); ret = irttp_connect_response(self->tsap, TTP_SAR_DISABLE, skb);
...@@ -133,7 +133,7 @@ int ircomm_ttp_data_request(struct ircomm_cb *self, struct sk_buff *skb, ...@@ -133,7 +133,7 @@ int ircomm_ttp_data_request(struct ircomm_cb *self, struct sk_buff *skb,
ASSERT(skb != NULL, return -1;); ASSERT(skb != NULL, return -1;);
IRDA_DEBUG(2, __FUNCTION__"(), clen=%d\n", clen); IRDA_DEBUG(2, "%s(), clen=%d\n", __FUNCTION__ , clen);
/* /*
* Insert clen field, currently we either send data only, or control * Insert clen field, currently we either send data only, or control
...@@ -164,7 +164,7 @@ int ircomm_ttp_data_indication(void *instance, void *sap, ...@@ -164,7 +164,7 @@ int ircomm_ttp_data_indication(void *instance, void *sap,
{ {
struct ircomm_cb *self = (struct ircomm_cb *) instance; struct ircomm_cb *self = (struct ircomm_cb *) instance;
IRDA_DEBUG(4, __FUNCTION__"()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == IRCOMM_MAGIC, return -1;); ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
...@@ -184,7 +184,7 @@ void ircomm_ttp_connect_confirm(void *instance, void *sap, ...@@ -184,7 +184,7 @@ void ircomm_ttp_connect_confirm(void *instance, void *sap,
struct ircomm_cb *self = (struct ircomm_cb *) instance; struct ircomm_cb *self = (struct ircomm_cb *) instance;
struct ircomm_info info; struct ircomm_info info;
IRDA_DEBUG(4, __FUNCTION__"()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_MAGIC, return;); ASSERT(self->magic == IRCOMM_MAGIC, return;);
...@@ -221,7 +221,7 @@ void ircomm_ttp_connect_indication(void *instance, void *sap, ...@@ -221,7 +221,7 @@ void ircomm_ttp_connect_indication(void *instance, void *sap,
struct ircomm_cb *self = (struct ircomm_cb *)instance; struct ircomm_cb *self = (struct ircomm_cb *)instance;
struct ircomm_info info; struct ircomm_info info;
IRDA_DEBUG(4, __FUNCTION__"()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_MAGIC, return;); ASSERT(self->magic == IRCOMM_MAGIC, return;);
...@@ -272,7 +272,7 @@ void ircomm_ttp_disconnect_indication(void *instance, void *sap, ...@@ -272,7 +272,7 @@ void ircomm_ttp_disconnect_indication(void *instance, void *sap,
struct ircomm_cb *self = (struct ircomm_cb *) instance; struct ircomm_cb *self = (struct ircomm_cb *) instance;
struct ircomm_info info; struct ircomm_info info;
IRDA_DEBUG(2, __FUNCTION__"()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_MAGIC, return;); ASSERT(self->magic == IRCOMM_MAGIC, return;);
...@@ -292,7 +292,7 @@ void ircomm_ttp_flow_indication(void *instance, void *sap, LOCAL_FLOW cmd) ...@@ -292,7 +292,7 @@ void ircomm_ttp_flow_indication(void *instance, void *sap, LOCAL_FLOW cmd)
{ {
struct ircomm_cb *self = (struct ircomm_cb *) instance; struct ircomm_cb *self = (struct ircomm_cb *) instance;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_MAGIC, return;); ASSERT(self->magic == IRCOMM_MAGIC, return;);
......
...@@ -143,7 +143,7 @@ int __init ircomm_tty_init(void) ...@@ -143,7 +143,7 @@ int __init ircomm_tty_init(void)
static void __exit __ircomm_tty_cleanup(struct ircomm_tty_cb *self) static void __exit __ircomm_tty_cleanup(struct ircomm_tty_cb *self)
{ {
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
...@@ -164,7 +164,7 @@ void __exit ircomm_tty_cleanup(void) ...@@ -164,7 +164,7 @@ void __exit ircomm_tty_cleanup(void)
{ {
int ret; int ret;
IRDA_DEBUG(4, __FUNCTION__"()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ret = tty_unregister_driver(&driver); ret = tty_unregister_driver(&driver);
if (ret) { if (ret) {
...@@ -186,14 +186,14 @@ static int ircomm_tty_startup(struct ircomm_tty_cb *self) ...@@ -186,14 +186,14 @@ static int ircomm_tty_startup(struct ircomm_tty_cb *self)
notify_t notify; notify_t notify;
int ret; int ret;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
/* Already open */ /* Already open */
if (self->flags & ASYNC_INITIALIZED) { if (self->flags & ASYNC_INITIALIZED) {
IRDA_DEBUG(2, __FUNCTION__ "(), already open so break out!\n"); IRDA_DEBUG(2, "%s(), already open so break out!\n", __FUNCTION__ );
return 0; return 0;
} }
...@@ -247,7 +247,7 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self, ...@@ -247,7 +247,7 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
unsigned long flags; unsigned long flags;
struct tty_struct *tty; struct tty_struct *tty;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
tty = self->tty; tty = self->tty;
...@@ -279,18 +279,18 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self, ...@@ -279,18 +279,18 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
return -EBUSY; return -EBUSY;
self->flags |= ASYNC_NORMAL_ACTIVE; self->flags |= ASYNC_NORMAL_ACTIVE;
IRDA_DEBUG(1, __FUNCTION__ "(), O_NONBLOCK requested!\n"); IRDA_DEBUG(1, "%s(), O_NONBLOCK requested!\n", __FUNCTION__ );
return 0; return 0;
} }
if (self->flags & ASYNC_CALLOUT_ACTIVE) { if (self->flags & ASYNC_CALLOUT_ACTIVE) {
if (self->normal_termios.c_cflag & CLOCAL) { if (self->normal_termios.c_cflag & CLOCAL) {
IRDA_DEBUG(1, __FUNCTION__ "(), doing CLOCAL!\n"); IRDA_DEBUG(1, "%s(), doing CLOCAL!\n", __FUNCTION__ );
do_clocal = 1; do_clocal = 1;
} }
} else { } else {
if (tty->termios->c_cflag & CLOCAL) { if (tty->termios->c_cflag & CLOCAL) {
IRDA_DEBUG(1, __FUNCTION__ "(), doing CLOCAL!\n"); IRDA_DEBUG(1, "%s(), doing CLOCAL!\n", __FUNCTION__ );
do_clocal = 1; do_clocal = 1;
} }
} }
...@@ -395,7 +395,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp) ...@@ -395,7 +395,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
unsigned long flags; unsigned long flags;
int ret; int ret;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
MOD_INC_USE_COUNT; MOD_INC_USE_COUNT;
line = minor(tty->device) - tty->driver.minor_start; line = minor(tty->device) - tty->driver.minor_start;
...@@ -452,7 +452,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp) ...@@ -452,7 +452,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
self->tty = tty; self->tty = tty;
spin_unlock_irqrestore(&self->spinlock, flags); spin_unlock_irqrestore(&self->spinlock, flags);
IRDA_DEBUG(1, __FUNCTION__"(), %s%d, count = %d\n", tty->driver.name, IRDA_DEBUG(1, "%s(), %s%d, count = %d\n", __FUNCTION__ , tty->driver.name,
self->line, self->open_count); self->line, self->open_count);
/* Not really used by us, but lets do it anyway */ /* Not really used by us, but lets do it anyway */
...@@ -492,9 +492,9 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp) ...@@ -492,9 +492,9 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
self->service_type = IRCOMM_3_WIRE | IRCOMM_9_WIRE; self->service_type = IRCOMM_3_WIRE | IRCOMM_9_WIRE;
self->settings.service_type = IRCOMM_9_WIRE; /* 9 wire as default */ self->settings.service_type = IRCOMM_9_WIRE; /* 9 wire as default */
self->settings.dce = IRCOMM_CTS | IRCOMM_CD; /* Default line settings */ self->settings.dce = IRCOMM_CTS | IRCOMM_CD; /* Default line settings */
IRDA_DEBUG(2, __FUNCTION__ "(), IrCOMM device\n"); IRDA_DEBUG(2, "%s(), IrCOMM device\n", __FUNCTION__ );
} else { } else {
IRDA_DEBUG(2, __FUNCTION__ "(), IrLPT device\n"); IRDA_DEBUG(2, "%s(), IrLPT device\n", __FUNCTION__ );
self->service_type = IRCOMM_3_WIRE_RAW; self->service_type = IRCOMM_3_WIRE_RAW;
self->settings.service_type = IRCOMM_3_WIRE_RAW; /* Default */ self->settings.service_type = IRCOMM_3_WIRE_RAW; /* Default */
} }
...@@ -506,8 +506,8 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp) ...@@ -506,8 +506,8 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
ret = ircomm_tty_block_til_ready(self, filp); ret = ircomm_tty_block_til_ready(self, filp);
if (ret) { if (ret) {
/* MOD_DEC_USE_COUNT; "info->tty" will cause this? */ /* MOD_DEC_USE_COUNT; "info->tty" will cause this? */
IRDA_DEBUG(2, __FUNCTION__ IRDA_DEBUG(2,
"(), returning after block_til_ready with %d\n", "%s(), returning after block_til_ready with %d\n", __FUNCTION__ ,
ret); ret);
return ret; return ret;
...@@ -530,7 +530,7 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp) ...@@ -530,7 +530,7 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
unsigned long flags; unsigned long flags;
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
if (!tty) if (!tty)
return; return;
...@@ -544,7 +544,7 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp) ...@@ -544,7 +544,7 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
MOD_DEC_USE_COUNT; MOD_DEC_USE_COUNT;
spin_unlock_irqrestore(&self->spinlock, flags); spin_unlock_irqrestore(&self->spinlock, flags);
IRDA_DEBUG(0, __FUNCTION__ "(), returning 1\n"); IRDA_DEBUG(0, "%s(), returning 1\n", __FUNCTION__ );
return; return;
} }
...@@ -556,8 +556,8 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp) ...@@ -556,8 +556,8 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
* one, we've got real problems, since it means the * one, we've got real problems, since it means the
* serial port won't be shutdown. * serial port won't be shutdown.
*/ */
IRDA_DEBUG(0, __FUNCTION__ "(), bad serial port count; " IRDA_DEBUG(0, "%s(), bad serial port count; "
"tty->count is 1, state->count is %d\n", "tty->count is 1, state->count is %d\n", __FUNCTION__ ,
self->open_count); self->open_count);
self->open_count = 1; self->open_count = 1;
} }
...@@ -571,7 +571,7 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp) ...@@ -571,7 +571,7 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
MOD_DEC_USE_COUNT; MOD_DEC_USE_COUNT;
spin_unlock_irqrestore(&self->spinlock, flags); spin_unlock_irqrestore(&self->spinlock, flags);
IRDA_DEBUG(0, __FUNCTION__ "(), open count > 0\n"); IRDA_DEBUG(0, "%s(), open count > 0\n", __FUNCTION__ );
return; return;
} }
self->flags |= ASYNC_CLOSING; self->flags |= ASYNC_CLOSING;
...@@ -650,7 +650,7 @@ static void ircomm_tty_do_softint(void *private_) ...@@ -650,7 +650,7 @@ static void ircomm_tty_do_softint(void *private_)
unsigned long flags; unsigned long flags;
struct sk_buff *skb, *ctrl_skb; struct sk_buff *skb, *ctrl_skb;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
if (!self || self->magic != IRCOMM_TTY_MAGIC) if (!self || self->magic != IRCOMM_TTY_MAGIC)
return; return;
...@@ -713,7 +713,7 @@ static int ircomm_tty_write(struct tty_struct *tty, int from_user, ...@@ -713,7 +713,7 @@ static int ircomm_tty_write(struct tty_struct *tty, int from_user,
int len = 0; int len = 0;
int size; int size;
IRDA_DEBUG(2, __FUNCTION__ "(), count=%d, hw_stopped=%d\n", count, IRDA_DEBUG(2, "%s(), count=%d, hw_stopped=%d\n", __FUNCTION__ , count,
tty->hw_stopped); tty->hw_stopped);
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
...@@ -729,7 +729,7 @@ static int ircomm_tty_write(struct tty_struct *tty, int from_user, ...@@ -729,7 +729,7 @@ static int ircomm_tty_write(struct tty_struct *tty, int from_user,
* Jean II */ * Jean II */
if (self->max_header_size == IRCOMM_TTY_HDR_UNITIALISED) { if (self->max_header_size == IRCOMM_TTY_HDR_UNITIALISED) {
/* TTY will retry */ /* TTY will retry */
IRDA_DEBUG(2, __FUNCTION__ "() : not initialised\n"); IRDA_DEBUG(2, "%s() : not initialised\n", __FUNCTION__ );
return len; return len;
} }
...@@ -843,7 +843,7 @@ static int ircomm_tty_write_room(struct tty_struct *tty) ...@@ -843,7 +843,7 @@ static int ircomm_tty_write_room(struct tty_struct *tty)
ret = self->max_data_size; ret = self->max_data_size;
spin_unlock_irqrestore(&self->spinlock, flags); spin_unlock_irqrestore(&self->spinlock, flags);
} }
IRDA_DEBUG(2, __FUNCTION__ "(), ret=%d\n", ret); IRDA_DEBUG(2, "%s(), ret=%d\n", __FUNCTION__ , ret);
return ret; return ret;
} }
...@@ -859,7 +859,7 @@ static void ircomm_tty_wait_until_sent(struct tty_struct *tty, int timeout) ...@@ -859,7 +859,7 @@ static void ircomm_tty_wait_until_sent(struct tty_struct *tty, int timeout)
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
unsigned long orig_jiffies, poll_time; unsigned long orig_jiffies, poll_time;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
...@@ -891,7 +891,7 @@ static void ircomm_tty_throttle(struct tty_struct *tty) ...@@ -891,7 +891,7 @@ static void ircomm_tty_throttle(struct tty_struct *tty)
{ {
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
...@@ -922,7 +922,7 @@ static void ircomm_tty_unthrottle(struct tty_struct *tty) ...@@ -922,7 +922,7 @@ static void ircomm_tty_unthrottle(struct tty_struct *tty)
{ {
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
...@@ -937,7 +937,7 @@ static void ircomm_tty_unthrottle(struct tty_struct *tty) ...@@ -937,7 +937,7 @@ static void ircomm_tty_unthrottle(struct tty_struct *tty)
self->settings.dte |= (IRCOMM_RTS|IRCOMM_DELTA_RTS); self->settings.dte |= (IRCOMM_RTS|IRCOMM_DELTA_RTS);
ircomm_param_request(self, IRCOMM_DTE, TRUE); ircomm_param_request(self, IRCOMM_DTE, TRUE);
IRDA_DEBUG(1, __FUNCTION__"(), FLOW_START\n"); IRDA_DEBUG(1, "%s(), FLOW_START\n", __FUNCTION__ );
} }
ircomm_flow_request(self->ircomm, FLOW_START); ircomm_flow_request(self->ircomm, FLOW_START);
} }
...@@ -974,7 +974,7 @@ static void ircomm_tty_shutdown(struct ircomm_tty_cb *self) ...@@ -974,7 +974,7 @@ static void ircomm_tty_shutdown(struct ircomm_tty_cb *self)
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
if (!(self->flags & ASYNC_INITIALIZED)) if (!(self->flags & ASYNC_INITIALIZED))
return; return;
...@@ -1018,7 +1018,7 @@ static void ircomm_tty_hangup(struct tty_struct *tty) ...@@ -1018,7 +1018,7 @@ static void ircomm_tty_hangup(struct tty_struct *tty)
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
unsigned long flags; unsigned long flags;
IRDA_DEBUG(0, __FUNCTION__"()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
...@@ -1047,7 +1047,7 @@ static void ircomm_tty_hangup(struct tty_struct *tty) ...@@ -1047,7 +1047,7 @@ static void ircomm_tty_hangup(struct tty_struct *tty)
*/ */
static void ircomm_tty_send_xchar(struct tty_struct *tty, char ch) static void ircomm_tty_send_xchar(struct tty_struct *tty, char ch)
{ {
IRDA_DEBUG(0, __FUNCTION__"(), not impl\n"); IRDA_DEBUG(0, "%s(), not impl\n", __FUNCTION__ );
} }
/* /*
...@@ -1091,7 +1091,7 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self) ...@@ -1091,7 +1091,7 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self)
struct tty_struct *tty; struct tty_struct *tty;
int status; int status;
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
...@@ -1104,8 +1104,8 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self) ...@@ -1104,8 +1104,8 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self)
/*wake_up_interruptible(&self->delta_msr_wait);*/ /*wake_up_interruptible(&self->delta_msr_wait);*/
} }
if ((self->flags & ASYNC_CHECK_CD) && (status & IRCOMM_DELTA_CD)) { if ((self->flags & ASYNC_CHECK_CD) && (status & IRCOMM_DELTA_CD)) {
IRDA_DEBUG(2, __FUNCTION__ IRDA_DEBUG(2,
"(), ircomm%d CD now %s...\n", self->line, "%s(), ircomm%d CD now %s...\n", __FUNCTION__ , self->line,
(status & IRCOMM_CD) ? "on" : "off"); (status & IRCOMM_CD) ? "on" : "off");
if (status & IRCOMM_CD) { if (status & IRCOMM_CD) {
...@@ -1113,8 +1113,8 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self) ...@@ -1113,8 +1113,8 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self)
} else if (!((self->flags & ASYNC_CALLOUT_ACTIVE) && } else if (!((self->flags & ASYNC_CALLOUT_ACTIVE) &&
(self->flags & ASYNC_CALLOUT_NOHUP))) (self->flags & ASYNC_CALLOUT_NOHUP)))
{ {
IRDA_DEBUG(2, __FUNCTION__ IRDA_DEBUG(2,
"(), Doing serial hangup..\n"); "%s(), Doing serial hangup..\n", __FUNCTION__ );
if (tty) if (tty)
tty_hangup(tty); tty_hangup(tty);
...@@ -1125,8 +1125,8 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self) ...@@ -1125,8 +1125,8 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self)
if (self->flags & ASYNC_CTS_FLOW) { if (self->flags & ASYNC_CTS_FLOW) {
if (tty->hw_stopped) { if (tty->hw_stopped) {
if (status & IRCOMM_CTS) { if (status & IRCOMM_CTS) {
IRDA_DEBUG(2, __FUNCTION__ IRDA_DEBUG(2,
"(), CTS tx start...\n"); "%s(), CTS tx start...\n", __FUNCTION__ );
tty->hw_stopped = 0; tty->hw_stopped = 0;
/* Wake up processes blocked on open */ /* Wake up processes blocked on open */
...@@ -1138,8 +1138,8 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self) ...@@ -1138,8 +1138,8 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self)
} }
} else { } else {
if (!(status & IRCOMM_CTS)) { if (!(status & IRCOMM_CTS)) {
IRDA_DEBUG(2, __FUNCTION__ IRDA_DEBUG(2,
"(), CTS tx stop...\n"); "%s(), CTS tx stop...\n", __FUNCTION__ );
tty->hw_stopped = 1; tty->hw_stopped = 1;
} }
} }
...@@ -1157,14 +1157,14 @@ static int ircomm_tty_data_indication(void *instance, void *sap, ...@@ -1157,14 +1157,14 @@ static int ircomm_tty_data_indication(void *instance, void *sap,
{ {
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
IRDA_DEBUG(2, __FUNCTION__"()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
ASSERT(skb != NULL, return -1;); ASSERT(skb != NULL, return -1;);
if (!self->tty) { if (!self->tty) {
IRDA_DEBUG(0, __FUNCTION__ "(), no tty!\n"); IRDA_DEBUG(0, "%s(), no tty!\n", __FUNCTION__ );
dev_kfree_skb(skb); dev_kfree_skb(skb);
return 0; return 0;
} }
...@@ -1176,7 +1176,7 @@ static int ircomm_tty_data_indication(void *instance, void *sap, ...@@ -1176,7 +1176,7 @@ static int ircomm_tty_data_indication(void *instance, void *sap,
* params, we can just as well declare the hardware for running. * params, we can just as well declare the hardware for running.
*/ */
if (self->tty->hw_stopped && (self->flow == FLOW_START)) { if (self->tty->hw_stopped && (self->flow == FLOW_START)) {
IRDA_DEBUG(0, __FUNCTION__ "(), polling for line settings!\n"); IRDA_DEBUG(0, "%s(), polling for line settings!\n", __FUNCTION__ );
ircomm_param_request(self, IRCOMM_POLL, TRUE); ircomm_param_request(self, IRCOMM_POLL, TRUE);
/* We can just as well declare the hardware for running */ /* We can just as well declare the hardware for running */
...@@ -1207,7 +1207,7 @@ static int ircomm_tty_control_indication(void *instance, void *sap, ...@@ -1207,7 +1207,7 @@ static int ircomm_tty_control_indication(void *instance, void *sap,
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
int clen; int clen;
IRDA_DEBUG(4, __FUNCTION__"()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
...@@ -1242,7 +1242,7 @@ static void ircomm_tty_flow_indication(void *instance, void *sap, ...@@ -1242,7 +1242,7 @@ static void ircomm_tty_flow_indication(void *instance, void *sap,
switch (cmd) { switch (cmd) {
case FLOW_START: case FLOW_START:
IRDA_DEBUG(2, __FUNCTION__ "(), hw start!\n"); IRDA_DEBUG(2, "%s(), hw start!\n", __FUNCTION__ );
tty->hw_stopped = 0; tty->hw_stopped = 0;
/* ircomm_tty_do_softint will take care of the rest */ /* ircomm_tty_do_softint will take care of the rest */
...@@ -1251,7 +1251,7 @@ static void ircomm_tty_flow_indication(void *instance, void *sap, ...@@ -1251,7 +1251,7 @@ static void ircomm_tty_flow_indication(void *instance, void *sap,
break; break;
default: /* If we get here, something is very wrong, better stop */ default: /* If we get here, something is very wrong, better stop */
case FLOW_STOP: case FLOW_STOP:
IRDA_DEBUG(2, __FUNCTION__ "(), hw stopped!\n"); IRDA_DEBUG(2, "%s(), hw stopped!\n", __FUNCTION__ );
tty->hw_stopped = 1; tty->hw_stopped = 1;
break; break;
} }
......
...@@ -126,14 +126,14 @@ static int (*state[])(struct ircomm_tty_cb *self, IRCOMM_TTY_EVENT event, ...@@ -126,14 +126,14 @@ static int (*state[])(struct ircomm_tty_cb *self, IRCOMM_TTY_EVENT event,
*/ */
int ircomm_tty_attach_cable(struct ircomm_tty_cb *self) int ircomm_tty_attach_cable(struct ircomm_tty_cb *self)
{ {
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
/* Check if somebody has already connected to us */ /* Check if somebody has already connected to us */
if (ircomm_is_connected(self->ircomm)) { if (ircomm_is_connected(self->ircomm)) {
IRDA_DEBUG(0, __FUNCTION__ "(), already connected!\n"); IRDA_DEBUG(0, "%s(), already connected!\n", __FUNCTION__ );
return 0; return 0;
} }
...@@ -144,7 +144,7 @@ int ircomm_tty_attach_cable(struct ircomm_tty_cb *self) ...@@ -144,7 +144,7 @@ int ircomm_tty_attach_cable(struct ircomm_tty_cb *self)
/* Check if somebody has already connected to us */ /* Check if somebody has already connected to us */
if (ircomm_is_connected(self->ircomm)) { if (ircomm_is_connected(self->ircomm)) {
IRDA_DEBUG(0, __FUNCTION__ "(), already connected!\n"); IRDA_DEBUG(0, "%s(), already connected!\n", __FUNCTION__ );
return 0; return 0;
} }
...@@ -161,7 +161,7 @@ int ircomm_tty_attach_cable(struct ircomm_tty_cb *self) ...@@ -161,7 +161,7 @@ int ircomm_tty_attach_cable(struct ircomm_tty_cb *self)
*/ */
void ircomm_tty_detach_cable(struct ircomm_tty_cb *self) void ircomm_tty_detach_cable(struct ircomm_tty_cb *self)
{ {
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
...@@ -203,7 +203,7 @@ static void ircomm_tty_ias_register(struct ircomm_tty_cb *self) ...@@ -203,7 +203,7 @@ static void ircomm_tty_ias_register(struct ircomm_tty_cb *self)
__u8 oct_seq[6]; __u8 oct_seq[6];
__u16 hints; __u16 hints;
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
...@@ -258,16 +258,16 @@ int ircomm_tty_send_initial_parameters(struct ircomm_tty_cb *self) ...@@ -258,16 +258,16 @@ int ircomm_tty_send_initial_parameters(struct ircomm_tty_cb *self)
* Set default values, but only if the application for some reason * Set default values, but only if the application for some reason
* haven't set them already * haven't set them already
*/ */
IRDA_DEBUG(2, __FUNCTION__ "(), data-rate = %d\n", IRDA_DEBUG(2, "%s(), data-rate = %d\n", __FUNCTION__ ,
self->settings.data_rate); self->settings.data_rate);
if (!self->settings.data_rate) if (!self->settings.data_rate)
self->settings.data_rate = 9600; self->settings.data_rate = 9600;
IRDA_DEBUG(2, __FUNCTION__ "(), data-format = %d\n", IRDA_DEBUG(2, "%s(), data-format = %d\n", __FUNCTION__ ,
self->settings.data_format); self->settings.data_format);
if (!self->settings.data_format) if (!self->settings.data_format)
self->settings.data_format = IRCOMM_WSIZE_8; /* 8N1 */ self->settings.data_format = IRCOMM_WSIZE_8; /* 8N1 */
IRDA_DEBUG(2, __FUNCTION__ "(), flow-control = %d\n", IRDA_DEBUG(2, "%s(), flow-control = %d\n", __FUNCTION__ ,
self->settings.flow_control); self->settings.flow_control);
/*self->settings.flow_control = IRCOMM_RTS_CTS_IN|IRCOMM_RTS_CTS_OUT;*/ /*self->settings.flow_control = IRCOMM_RTS_CTS_IN|IRCOMM_RTS_CTS_OUT;*/
...@@ -312,7 +312,7 @@ static void ircomm_tty_discovery_indication(discovery_t *discovery, ...@@ -312,7 +312,7 @@ static void ircomm_tty_discovery_indication(discovery_t *discovery,
struct ircomm_tty_cb *self; struct ircomm_tty_cb *self;
struct ircomm_tty_info info; struct ircomm_tty_info info;
IRDA_DEBUG(2, __FUNCTION__"()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
/* Important note : /* Important note :
* We need to drop all passive discoveries. * We need to drop all passive discoveries.
...@@ -356,7 +356,7 @@ void ircomm_tty_disconnect_indication(void *instance, void *sap, ...@@ -356,7 +356,7 @@ void ircomm_tty_disconnect_indication(void *instance, void *sap,
{ {
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
...@@ -386,7 +386,7 @@ static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id, ...@@ -386,7 +386,7 @@ static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id,
{ {
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) priv; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) priv;
IRDA_DEBUG(2, __FUNCTION__"()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
...@@ -397,13 +397,13 @@ static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id, ...@@ -397,13 +397,13 @@ static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id,
/* Check if request succeeded */ /* Check if request succeeded */
if (result != IAS_SUCCESS) { if (result != IAS_SUCCESS) {
IRDA_DEBUG(4, __FUNCTION__ "(), got NULL value!\n"); IRDA_DEBUG(4, "%s(), got NULL value!\n", __FUNCTION__ );
return; return;
} }
switch (value->type) { switch (value->type) {
case IAS_OCT_SEQ: case IAS_OCT_SEQ:
IRDA_DEBUG(2, __FUNCTION__"(), got octet sequence\n"); IRDA_DEBUG(2, "%s(), got octet sequence\n", __FUNCTION__ );
irda_param_extract_all(self, value->t.oct_seq, value->len, irda_param_extract_all(self, value->t.oct_seq, value->len,
&ircomm_param_info); &ircomm_param_info);
...@@ -413,21 +413,21 @@ static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id, ...@@ -413,21 +413,21 @@ static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id,
break; break;
case IAS_INTEGER: case IAS_INTEGER:
/* Got LSAP selector */ /* Got LSAP selector */
IRDA_DEBUG(2, __FUNCTION__"(), got lsapsel = %d\n", IRDA_DEBUG(2, "%s(), got lsapsel = %d\n", __FUNCTION__ ,
value->t.integer); value->t.integer);
if (value->t.integer == -1) { if (value->t.integer == -1) {
IRDA_DEBUG(0, __FUNCTION__"(), invalid value!\n"); IRDA_DEBUG(0, "%s(), invalid value!\n", __FUNCTION__ );
} else } else
self->dlsap_sel = value->t.integer; self->dlsap_sel = value->t.integer;
ircomm_tty_do_event(self, IRCOMM_TTY_GOT_LSAPSEL, NULL, NULL); ircomm_tty_do_event(self, IRCOMM_TTY_GOT_LSAPSEL, NULL, NULL);
break; break;
case IAS_MISSING: case IAS_MISSING:
IRDA_DEBUG(0, __FUNCTION__"(), got IAS_MISSING\n"); IRDA_DEBUG(0, "%s(), got IAS_MISSING\n", __FUNCTION__ );
break; break;
default: default:
IRDA_DEBUG(0, __FUNCTION__"(), got unknown type!\n"); IRDA_DEBUG(0, "%s(), got unknown type!\n", __FUNCTION__ );
break; break;
} }
irias_delete_value(value); irias_delete_value(value);
...@@ -447,7 +447,7 @@ void ircomm_tty_connect_confirm(void *instance, void *sap, ...@@ -447,7 +447,7 @@ void ircomm_tty_connect_confirm(void *instance, void *sap,
{ {
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
...@@ -478,7 +478,7 @@ void ircomm_tty_connect_indication(void *instance, void *sap, ...@@ -478,7 +478,7 @@ void ircomm_tty_connect_indication(void *instance, void *sap,
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
int clen; int clen;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
...@@ -507,7 +507,7 @@ void ircomm_tty_connect_indication(void *instance, void *sap, ...@@ -507,7 +507,7 @@ void ircomm_tty_connect_indication(void *instance, void *sap,
*/ */
void ircomm_tty_link_established(struct ircomm_tty_cb *self) void ircomm_tty_link_established(struct ircomm_tty_cb *self)
{ {
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
...@@ -524,10 +524,10 @@ void ircomm_tty_link_established(struct ircomm_tty_cb *self) ...@@ -524,10 +524,10 @@ void ircomm_tty_link_established(struct ircomm_tty_cb *self)
* line. * line.
*/ */
if ((self->flags & ASYNC_CTS_FLOW) && ((self->settings.dce & IRCOMM_CTS) == 0)) { if ((self->flags & ASYNC_CTS_FLOW) && ((self->settings.dce & IRCOMM_CTS) == 0)) {
IRDA_DEBUG(0, __FUNCTION__ "(), waiting for CTS ...\n"); IRDA_DEBUG(0, "%s(), waiting for CTS ...\n", __FUNCTION__ );
return; return;
} else { } else {
IRDA_DEBUG(2, __FUNCTION__ "(), starting hardware!\n"); IRDA_DEBUG(2, "%s(), starting hardware!\n", __FUNCTION__ );
self->tty->hw_stopped = 0; self->tty->hw_stopped = 0;
...@@ -565,7 +565,7 @@ void ircomm_tty_watchdog_timer_expired(void *data) ...@@ -565,7 +565,7 @@ void ircomm_tty_watchdog_timer_expired(void *data)
{ {
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) data; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) data;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
...@@ -586,7 +586,7 @@ static int ircomm_tty_state_idle(struct ircomm_tty_cb *self, ...@@ -586,7 +586,7 @@ static int ircomm_tty_state_idle(struct ircomm_tty_cb *self,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(2, __FUNCTION__": state=%s, event=%s\n", IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ ,
ircomm_tty_state[self->state], ircomm_tty_event[event]); ircomm_tty_state[self->state], ircomm_tty_event[event]);
switch (event) { switch (event) {
case IRCOMM_TTY_ATTACH_CABLE: case IRCOMM_TTY_ATTACH_CABLE:
...@@ -629,7 +629,7 @@ static int ircomm_tty_state_idle(struct ircomm_tty_cb *self, ...@@ -629,7 +629,7 @@ static int ircomm_tty_state_idle(struct ircomm_tty_cb *self,
ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
break; break;
default: default:
IRDA_DEBUG(2, __FUNCTION__"(), unknown event: %s\n", IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ ,
ircomm_tty_event[event]); ircomm_tty_event[event]);
return -EINVAL; return -EINVAL;
} }
...@@ -649,7 +649,7 @@ static int ircomm_tty_state_search(struct ircomm_tty_cb *self, ...@@ -649,7 +649,7 @@ static int ircomm_tty_state_search(struct ircomm_tty_cb *self,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(2, __FUNCTION__": state=%s, event=%s\n", IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ ,
ircomm_tty_state[self->state], ircomm_tty_event[event]); ircomm_tty_state[self->state], ircomm_tty_event[event]);
switch (event) { switch (event) {
...@@ -700,7 +700,7 @@ static int ircomm_tty_state_search(struct ircomm_tty_cb *self, ...@@ -700,7 +700,7 @@ static int ircomm_tty_state_search(struct ircomm_tty_cb *self,
ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
break; break;
default: default:
IRDA_DEBUG(2, __FUNCTION__"(), unknown event: %s\n", IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ ,
ircomm_tty_event[event]); ircomm_tty_event[event]);
return -EINVAL; return -EINVAL;
} }
...@@ -720,7 +720,7 @@ static int ircomm_tty_state_query_parameters(struct ircomm_tty_cb *self, ...@@ -720,7 +720,7 @@ static int ircomm_tty_state_query_parameters(struct ircomm_tty_cb *self,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(2, __FUNCTION__": state=%s, event=%s\n", IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ ,
ircomm_tty_state[self->state], ircomm_tty_event[event]); ircomm_tty_state[self->state], ircomm_tty_event[event]);
switch (event) { switch (event) {
...@@ -756,7 +756,7 @@ static int ircomm_tty_state_query_parameters(struct ircomm_tty_cb *self, ...@@ -756,7 +756,7 @@ static int ircomm_tty_state_query_parameters(struct ircomm_tty_cb *self,
ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
break; break;
default: default:
IRDA_DEBUG(2, __FUNCTION__"(), unknown event: %s\n", IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ ,
ircomm_tty_event[event]); ircomm_tty_event[event]);
return -EINVAL; return -EINVAL;
} }
...@@ -776,7 +776,7 @@ static int ircomm_tty_state_query_lsap_sel(struct ircomm_tty_cb *self, ...@@ -776,7 +776,7 @@ static int ircomm_tty_state_query_lsap_sel(struct ircomm_tty_cb *self,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(2, __FUNCTION__": state=%s, event=%s\n", IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ ,
ircomm_tty_state[self->state], ircomm_tty_event[event]); ircomm_tty_state[self->state], ircomm_tty_event[event]);
switch (event) { switch (event) {
...@@ -804,7 +804,7 @@ static int ircomm_tty_state_query_lsap_sel(struct ircomm_tty_cb *self, ...@@ -804,7 +804,7 @@ static int ircomm_tty_state_query_lsap_sel(struct ircomm_tty_cb *self,
ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
break; break;
default: default:
IRDA_DEBUG(2, __FUNCTION__"(), unknown event: %s\n", IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ ,
ircomm_tty_event[event]); ircomm_tty_event[event]);
return -EINVAL; return -EINVAL;
} }
...@@ -824,7 +824,7 @@ static int ircomm_tty_state_setup(struct ircomm_tty_cb *self, ...@@ -824,7 +824,7 @@ static int ircomm_tty_state_setup(struct ircomm_tty_cb *self,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(2, __FUNCTION__": state=%s, event=%s\n", IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ ,
ircomm_tty_state[self->state], ircomm_tty_event[event]); ircomm_tty_state[self->state], ircomm_tty_event[event]);
switch (event) { switch (event) {
...@@ -856,7 +856,7 @@ static int ircomm_tty_state_setup(struct ircomm_tty_cb *self, ...@@ -856,7 +856,7 @@ static int ircomm_tty_state_setup(struct ircomm_tty_cb *self,
ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
break; break;
default: default:
IRDA_DEBUG(2, __FUNCTION__"(), unknown event: %s\n", IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ ,
ircomm_tty_event[event]); ircomm_tty_event[event]);
return -EINVAL; return -EINVAL;
} }
...@@ -893,13 +893,13 @@ static int ircomm_tty_state_ready(struct ircomm_tty_cb *self, ...@@ -893,13 +893,13 @@ static int ircomm_tty_state_ready(struct ircomm_tty_cb *self,
self->settings.dce = IRCOMM_DELTA_CD; self->settings.dce = IRCOMM_DELTA_CD;
ircomm_tty_check_modem_status(self); ircomm_tty_check_modem_status(self);
} else { } else {
IRDA_DEBUG(0, __FUNCTION__ "(), hanging up!\n"); IRDA_DEBUG(0, "%s(), hanging up!\n", __FUNCTION__ );
if (self->tty) if (self->tty)
tty_hangup(self->tty); tty_hangup(self->tty);
} }
break; break;
default: default:
IRDA_DEBUG(2, __FUNCTION__"(), unknown event: %s\n", IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ ,
ircomm_tty_event[event]); ircomm_tty_event[event]);
return -EINVAL; return -EINVAL;
} }
...@@ -918,7 +918,7 @@ int ircomm_tty_do_event(struct ircomm_tty_cb *self, IRCOMM_TTY_EVENT event, ...@@ -918,7 +918,7 @@ int ircomm_tty_do_event(struct ircomm_tty_cb *self, IRCOMM_TTY_EVENT event,
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
IRDA_DEBUG(2, __FUNCTION__": state=%s, event=%s\n", IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ ,
ircomm_tty_state[self->state], ircomm_tty_event[event]); ircomm_tty_state[self->state], ircomm_tty_event[event]);
return (*state[self->state])(self, event, skb, info); return (*state[self->state])(self, event, skb, info);
...@@ -937,7 +937,7 @@ void ircomm_tty_next_state(struct ircomm_tty_cb *self, IRCOMM_TTY_STATE state) ...@@ -937,7 +937,7 @@ void ircomm_tty_next_state(struct ircomm_tty_cb *self, IRCOMM_TTY_STATE state)
self->state = state; self->state = state;
IRDA_DEBUG(2, __FUNCTION__": next state=%s, service type=%d\n", IRDA_DEBUG(2, "%s: next state=%s, service type=%d\n", __FUNCTION__ ,
ircomm_tty_state[self->state], self->service_type); ircomm_tty_state[self->state], self->service_type);
} }
...@@ -58,7 +58,7 @@ void ircomm_tty_change_speed(struct ircomm_tty_cb *self) ...@@ -58,7 +58,7 @@ void ircomm_tty_change_speed(struct ircomm_tty_cb *self)
unsigned cflag, cval; unsigned cflag, cval;
int baud; int baud;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
if (!self->tty || !self->tty->termios || !self->ircomm) if (!self->tty || !self->tty->termios || !self->ircomm)
return; return;
...@@ -151,7 +151,7 @@ void ircomm_tty_set_termios(struct tty_struct *tty, ...@@ -151,7 +151,7 @@ void ircomm_tty_set_termios(struct tty_struct *tty,
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
unsigned int cflag = tty->termios->c_cflag; unsigned int cflag = tty->termios->c_cflag;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
if ((cflag == old_termios->c_cflag) && if ((cflag == old_termios->c_cflag) &&
(RELEVANT_IFLAG(tty->termios->c_iflag) == (RELEVANT_IFLAG(tty->termios->c_iflag) ==
...@@ -200,7 +200,7 @@ static int ircomm_tty_get_modem_info(struct ircomm_tty_cb *self, ...@@ -200,7 +200,7 @@ static int ircomm_tty_get_modem_info(struct ircomm_tty_cb *self,
{ {
unsigned int result; unsigned int result;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
result = ((self->settings.dte & IRCOMM_RTS) ? TIOCM_RTS : 0) result = ((self->settings.dte & IRCOMM_RTS) ? TIOCM_RTS : 0)
| ((self->settings.dte & IRCOMM_DTR) ? TIOCM_DTR : 0) | ((self->settings.dte & IRCOMM_DTR) ? TIOCM_DTR : 0)
...@@ -224,7 +224,7 @@ static int ircomm_tty_set_modem_info(struct ircomm_tty_cb *self, ...@@ -224,7 +224,7 @@ static int ircomm_tty_set_modem_info(struct ircomm_tty_cb *self,
unsigned int arg; unsigned int arg;
__u8 old_rts, old_dtr; __u8 old_rts, old_dtr;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
...@@ -286,7 +286,7 @@ static int ircomm_tty_get_serial_info(struct ircomm_tty_cb *self, ...@@ -286,7 +286,7 @@ static int ircomm_tty_get_serial_info(struct ircomm_tty_cb *self,
if (!retinfo) if (!retinfo)
return -EFAULT; return -EFAULT;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
memset(&info, 0, sizeof(info)); memset(&info, 0, sizeof(info));
info.line = self->line; info.line = self->line;
...@@ -322,7 +322,7 @@ static int ircomm_tty_set_serial_info(struct ircomm_tty_cb *self, ...@@ -322,7 +322,7 @@ static int ircomm_tty_set_serial_info(struct ircomm_tty_cb *self,
struct serial_struct new_serial; struct serial_struct new_serial;
struct ircomm_tty_cb old_state, *state; struct ircomm_tty_cb old_state, *state;
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
if (copy_from_user(&new_serial,new_info,sizeof(new_serial))) if (copy_from_user(&new_serial,new_info,sizeof(new_serial)))
return -EFAULT; return -EFAULT;
...@@ -396,7 +396,7 @@ int ircomm_tty_ioctl(struct tty_struct *tty, struct file *file, ...@@ -396,7 +396,7 @@ int ircomm_tty_ioctl(struct tty_struct *tty, struct file *file,
struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
int ret = 0; int ret = 0;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) && if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
(cmd != TIOCSERCONFIG) && (cmd != TIOCSERGSTRUCT) && (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGSTRUCT) &&
...@@ -425,7 +425,7 @@ int ircomm_tty_ioctl(struct tty_struct *tty, struct file *file, ...@@ -425,7 +425,7 @@ int ircomm_tty_ioctl(struct tty_struct *tty, struct file *file,
break; break;
case TIOCGICOUNT: case TIOCGICOUNT:
IRDA_DEBUG(0, __FUNCTION__ "(), TIOCGICOUNT not impl!\n"); IRDA_DEBUG(0, "%s(), TIOCGICOUNT not impl!\n", __FUNCTION__ );
#if 0 #if 0
save_flags(flags); cli(); save_flags(flags); cli();
cnow = driver->icount; cnow = driver->icount;
......
...@@ -71,7 +71,7 @@ static void irlan_client_kick_timer_expired(void *data) ...@@ -71,7 +71,7 @@ static void irlan_client_kick_timer_expired(void *data)
{ {
struct irlan_cb *self = (struct irlan_cb *) data; struct irlan_cb *self = (struct irlan_cb *) data;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRLAN_MAGIC, return;); ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -90,7 +90,7 @@ static void irlan_client_kick_timer_expired(void *data) ...@@ -90,7 +90,7 @@ static void irlan_client_kick_timer_expired(void *data)
void irlan_client_start_kick_timer(struct irlan_cb *self, int timeout) void irlan_client_start_kick_timer(struct irlan_cb *self, int timeout)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
irda_start_timer(&self->client.kick_timer, timeout, (void *) self, irda_start_timer(&self->client.kick_timer, timeout, (void *) self,
irlan_client_kick_timer_expired); irlan_client_kick_timer_expired);
...@@ -104,7 +104,7 @@ void irlan_client_start_kick_timer(struct irlan_cb *self, int timeout) ...@@ -104,7 +104,7 @@ void irlan_client_start_kick_timer(struct irlan_cb *self, int timeout)
*/ */
void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr) void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr)
{ {
IRDA_DEBUG(1, __FUNCTION__ "()\n"); IRDA_DEBUG(1, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRLAN_MAGIC, return;); ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -116,7 +116,7 @@ void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr) ...@@ -116,7 +116,7 @@ void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr)
if ((self->client.state != IRLAN_IDLE) || if ((self->client.state != IRLAN_IDLE) ||
(self->provider.access_type == ACCESS_DIRECT)) (self->provider.access_type == ACCESS_DIRECT))
{ {
IRDA_DEBUG(0, __FUNCTION__ "(), already awake!\n"); IRDA_DEBUG(0, "%s(), already awake!\n", __FUNCTION__ );
return; return;
} }
...@@ -125,7 +125,7 @@ void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr) ...@@ -125,7 +125,7 @@ void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr)
self->daddr = daddr; self->daddr = daddr;
if (self->disconnect_reason == LM_USER_REQUEST) { if (self->disconnect_reason == LM_USER_REQUEST) {
IRDA_DEBUG(0, __FUNCTION__ "(), still stopped by user\n"); IRDA_DEBUG(0, "%s(), still stopped by user\n", __FUNCTION__ );
return; return;
} }
...@@ -152,7 +152,7 @@ void irlan_client_discovery_indication(discovery_t *discovery, ...@@ -152,7 +152,7 @@ void irlan_client_discovery_indication(discovery_t *discovery,
struct irlan_cb *self; struct irlan_cb *self;
__u32 saddr, daddr; __u32 saddr, daddr;
IRDA_DEBUG(1, __FUNCTION__"()\n"); IRDA_DEBUG(1, "%s()\n", __FUNCTION__ );
ASSERT(irlan != NULL, return;); ASSERT(irlan != NULL, return;);
ASSERT(discovery != NULL, return;); ASSERT(discovery != NULL, return;);
...@@ -174,7 +174,7 @@ void irlan_client_discovery_indication(discovery_t *discovery, ...@@ -174,7 +174,7 @@ void irlan_client_discovery_indication(discovery_t *discovery,
if (self) { if (self) {
ASSERT(self->magic == IRLAN_MAGIC, return;); ASSERT(self->magic == IRLAN_MAGIC, return;);
IRDA_DEBUG(1, __FUNCTION__ "(), Found instance (%08x)!\n", IRDA_DEBUG(1, "%s(), Found instance (%08x)!\n", __FUNCTION__ ,
daddr); daddr);
irlan_client_wakeup(self, saddr, daddr); irlan_client_wakeup(self, saddr, daddr);
...@@ -192,7 +192,7 @@ static int irlan_client_ctrl_data_indication(void *instance, void *sap, ...@@ -192,7 +192,7 @@ static int irlan_client_ctrl_data_indication(void *instance, void *sap,
{ {
struct irlan_cb *self; struct irlan_cb *self;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
self = (struct irlan_cb *) instance; self = (struct irlan_cb *) instance;
...@@ -203,7 +203,7 @@ static int irlan_client_ctrl_data_indication(void *instance, void *sap, ...@@ -203,7 +203,7 @@ static int irlan_client_ctrl_data_indication(void *instance, void *sap,
irlan_do_client_event(self, IRLAN_DATA_INDICATION, skb); irlan_do_client_event(self, IRLAN_DATA_INDICATION, skb);
/* Ready for a new command */ /* Ready for a new command */
IRDA_DEBUG(2, __FUNCTION__ "(), clearing tx_busy\n"); IRDA_DEBUG(2, "%s(), clearing tx_busy\n", __FUNCTION__ );
self->client.tx_busy = FALSE; self->client.tx_busy = FALSE;
/* Check if we have some queued commands waiting to be sent */ /* Check if we have some queued commands waiting to be sent */
...@@ -220,7 +220,7 @@ static void irlan_client_ctrl_disconnect_indication(void *instance, void *sap, ...@@ -220,7 +220,7 @@ static void irlan_client_ctrl_disconnect_indication(void *instance, void *sap,
struct tsap_cb *tsap; struct tsap_cb *tsap;
struct sk_buff *skb; struct sk_buff *skb;
IRDA_DEBUG(4, __FUNCTION__ "(), reason=%d\n", reason); IRDA_DEBUG(4, "%s(), reason=%d\n", __FUNCTION__ , reason);
self = (struct irlan_cb *) instance; self = (struct irlan_cb *) instance;
tsap = (struct tsap_cb *) sap; tsap = (struct tsap_cb *) sap;
...@@ -252,7 +252,7 @@ void irlan_client_open_ctrl_tsap(struct irlan_cb *self) ...@@ -252,7 +252,7 @@ void irlan_client_open_ctrl_tsap(struct irlan_cb *self)
struct tsap_cb *tsap; struct tsap_cb *tsap;
notify_t notify; notify_t notify;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRLAN_MAGIC, return;); ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -272,7 +272,7 @@ void irlan_client_open_ctrl_tsap(struct irlan_cb *self) ...@@ -272,7 +272,7 @@ void irlan_client_open_ctrl_tsap(struct irlan_cb *self)
tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, &notify); tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, &notify);
if (!tsap) { if (!tsap) {
IRDA_DEBUG(2, __FUNCTION__ "(), Got no tsap!\n"); IRDA_DEBUG(2, "%s(), Got no tsap!\n", __FUNCTION__ );
return; return;
} }
self->client.tsap_ctrl = tsap; self->client.tsap_ctrl = tsap;
...@@ -292,7 +292,7 @@ static void irlan_client_ctrl_connect_confirm(void *instance, void *sap, ...@@ -292,7 +292,7 @@ static void irlan_client_ctrl_connect_confirm(void *instance, void *sap,
{ {
struct irlan_cb *self; struct irlan_cb *self;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
self = (struct irlan_cb *) instance; self = (struct irlan_cb *) instance;
...@@ -318,7 +318,7 @@ void irlan_client_reconnect_data_channel(struct irlan_cb *self) ...@@ -318,7 +318,7 @@ void irlan_client_reconnect_data_channel(struct irlan_cb *self)
struct sk_buff *skb; struct sk_buff *skb;
__u8 *frame; __u8 *frame;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRLAN_MAGIC, return;); ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -361,7 +361,7 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb) ...@@ -361,7 +361,7 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb)
ASSERT(skb != NULL, return;); ASSERT(skb != NULL, return;);
IRDA_DEBUG(4, __FUNCTION__ "() skb->len=%d\n", (int) skb->len); IRDA_DEBUG(4, "%s() skb->len=%d\n", __FUNCTION__ , (int) skb->len);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRLAN_MAGIC, return;); ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -392,7 +392,7 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb) ...@@ -392,7 +392,7 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb)
/* How many parameters? */ /* How many parameters? */
count = frame[1]; count = frame[1];
IRDA_DEBUG(4, __FUNCTION__ "(), got %d parameters\n", count); IRDA_DEBUG(4, "%s(), got %d parameters\n", __FUNCTION__ , count);
ptr = frame+2; ptr = frame+2;
...@@ -400,7 +400,7 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb) ...@@ -400,7 +400,7 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb)
for (i=0; i<count;i++) { for (i=0; i<count;i++) {
ret = irlan_extract_param(ptr, name, value, &val_len); ret = irlan_extract_param(ptr, name, value, &val_len);
if (ret < 0) { if (ret < 0) {
IRDA_DEBUG(2, __FUNCTION__ "(), IrLAN, Error!\n"); IRDA_DEBUG(2, "%s(), IrLAN, Error!\n", __FUNCTION__ );
break; break;
} }
ptr += ret; ptr += ret;
...@@ -424,7 +424,7 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param, ...@@ -424,7 +424,7 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param,
__u8 *bytes; __u8 *bytes;
int i; int i;
IRDA_DEBUG(4, __FUNCTION__ "(), parm=%s\n", param); IRDA_DEBUG(4, "%s(), parm=%s\n", __FUNCTION__ , param);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRLAN_MAGIC, return;); ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -462,7 +462,7 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param, ...@@ -462,7 +462,7 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param,
else if (strcmp(value, "HOSTED") == 0) else if (strcmp(value, "HOSTED") == 0)
self->client.access_type = ACCESS_HOSTED; self->client.access_type = ACCESS_HOSTED;
else { else {
IRDA_DEBUG(2, __FUNCTION__ "(), unknown access type!\n"); IRDA_DEBUG(2, "%s(), unknown access type!\n", __FUNCTION__ );
} }
} }
/* IRLAN version */ /* IRLAN version */
...@@ -484,14 +484,14 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param, ...@@ -484,14 +484,14 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param,
memcpy(&tmp_cpu, value, 2); /* Align value */ memcpy(&tmp_cpu, value, 2); /* Align value */
le16_to_cpus(&tmp_cpu); /* Convert to host order */ le16_to_cpus(&tmp_cpu); /* Convert to host order */
self->client.recv_arb_val = tmp_cpu; self->client.recv_arb_val = tmp_cpu;
IRDA_DEBUG(2, __FUNCTION__ "(), receive arb val=%d\n", IRDA_DEBUG(2, "%s(), receive arb val=%d\n", __FUNCTION__ ,
self->client.recv_arb_val); self->client.recv_arb_val);
} }
if (strcmp(param, "MAX_FRAME") == 0) { if (strcmp(param, "MAX_FRAME") == 0) {
memcpy(&tmp_cpu, value, 2); /* Align value */ memcpy(&tmp_cpu, value, 2); /* Align value */
le16_to_cpus(&tmp_cpu); /* Convert to host order */ le16_to_cpus(&tmp_cpu); /* Convert to host order */
self->client.max_frame = tmp_cpu; self->client.max_frame = tmp_cpu;
IRDA_DEBUG(4, __FUNCTION__ "(), max frame=%d\n", IRDA_DEBUG(4, "%s(), max frame=%d\n", __FUNCTION__ ,
self->client.max_frame); self->client.max_frame);
} }
...@@ -526,7 +526,7 @@ void irlan_client_get_value_confirm(int result, __u16 obj_id, ...@@ -526,7 +526,7 @@ void irlan_client_get_value_confirm(int result, __u16 obj_id,
{ {
struct irlan_cb *self; struct irlan_cb *self;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(priv != NULL, return;); ASSERT(priv != NULL, return;);
...@@ -539,7 +539,7 @@ void irlan_client_get_value_confirm(int result, __u16 obj_id, ...@@ -539,7 +539,7 @@ void irlan_client_get_value_confirm(int result, __u16 obj_id,
/* Check if request succeeded */ /* Check if request succeeded */
if (result != IAS_SUCCESS) { if (result != IAS_SUCCESS) {
IRDA_DEBUG(2, __FUNCTION__ "(), got NULL value!\n"); IRDA_DEBUG(2, "%s(), got NULL value!\n", __FUNCTION__ );
irlan_do_client_event(self, IRLAN_IAS_PROVIDER_NOT_AVAIL, irlan_do_client_event(self, IRLAN_IAS_PROVIDER_NOT_AVAIL,
NULL); NULL);
return; return;
...@@ -557,7 +557,7 @@ void irlan_client_get_value_confirm(int result, __u16 obj_id, ...@@ -557,7 +557,7 @@ void irlan_client_get_value_confirm(int result, __u16 obj_id,
irias_delete_value(value); irias_delete_value(value);
break; break;
default: default:
IRDA_DEBUG(2, __FUNCTION__ "(), unknown type!\n"); IRDA_DEBUG(2, "%s(), unknown type!\n", __FUNCTION__ );
break; break;
} }
irlan_do_client_event(self, IRLAN_IAS_PROVIDER_NOT_AVAIL, NULL); irlan_do_client_event(self, IRLAN_IAS_PROVIDER_NOT_AVAIL, NULL);
......
...@@ -92,7 +92,7 @@ void irlan_do_client_event(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -92,7 +92,7 @@ void irlan_do_client_event(struct irlan_cb *self, IRLAN_EVENT event,
static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event, static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == IRLAN_MAGIC, return -1;); ASSERT(self->magic == IRLAN_MAGIC, return -1;);
...@@ -113,10 +113,10 @@ static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -113,10 +113,10 @@ static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
"IrLAN", "IrDA:TinyTP:LsapSel"); "IrLAN", "IrDA:TinyTP:LsapSel");
break; break;
case IRLAN_WATCHDOG_TIMEOUT: case IRLAN_WATCHDOG_TIMEOUT:
IRDA_DEBUG(2, __FUNCTION__ "(), IRLAN_WATCHDOG_TIMEOUT\n"); IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ );
break; break;
default: default:
IRDA_DEBUG(4, __FUNCTION__ "(), Unknown event %d\n", event); IRDA_DEBUG(4, "%s(), Unknown event %d\n", __FUNCTION__ , event);
break; break;
} }
if (skb) if (skb)
...@@ -135,7 +135,7 @@ static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -135,7 +135,7 @@ static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event, static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == IRLAN_MAGIC, return -1;); ASSERT(self->magic == IRLAN_MAGIC, return -1;);
...@@ -153,7 +153,7 @@ static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -153,7 +153,7 @@ static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event,
irlan_next_client_state(self, IRLAN_CONN); irlan_next_client_state(self, IRLAN_CONN);
break; break;
case IRLAN_IAS_PROVIDER_NOT_AVAIL: case IRLAN_IAS_PROVIDER_NOT_AVAIL:
IRDA_DEBUG(2, __FUNCTION__ "(), IAS_PROVIDER_NOT_AVAIL\n"); IRDA_DEBUG(2, "%s(), IAS_PROVIDER_NOT_AVAIL\n", __FUNCTION__ );
irlan_next_client_state(self, IRLAN_IDLE); irlan_next_client_state(self, IRLAN_IDLE);
/* Give the client a kick! */ /* Give the client a kick! */
...@@ -166,10 +166,10 @@ static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -166,10 +166,10 @@ static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event,
irlan_next_client_state(self, IRLAN_IDLE); irlan_next_client_state(self, IRLAN_IDLE);
break; break;
case IRLAN_WATCHDOG_TIMEOUT: case IRLAN_WATCHDOG_TIMEOUT:
IRDA_DEBUG(2, __FUNCTION__ "(), IRLAN_WATCHDOG_TIMEOUT\n"); IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ );
break; break;
default: default:
IRDA_DEBUG(2, __FUNCTION__"(), Unknown event %d\n", event); IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event);
break; break;
} }
if (skb) if (skb)
...@@ -188,7 +188,7 @@ static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -188,7 +188,7 @@ static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event,
static int irlan_client_state_conn(struct irlan_cb *self, IRLAN_EVENT event, static int irlan_client_state_conn(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
...@@ -203,10 +203,10 @@ static int irlan_client_state_conn(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -203,10 +203,10 @@ static int irlan_client_state_conn(struct irlan_cb *self, IRLAN_EVENT event,
irlan_next_client_state(self, IRLAN_IDLE); irlan_next_client_state(self, IRLAN_IDLE);
break; break;
case IRLAN_WATCHDOG_TIMEOUT: case IRLAN_WATCHDOG_TIMEOUT:
IRDA_DEBUG(2, __FUNCTION__ "(), IRLAN_WATCHDOG_TIMEOUT\n"); IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ );
break; break;
default: default:
IRDA_DEBUG(2, __FUNCTION__ "(), Unknown event %d\n", event); IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event);
break; break;
} }
if (skb) if (skb)
...@@ -223,7 +223,7 @@ static int irlan_client_state_conn(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -223,7 +223,7 @@ static int irlan_client_state_conn(struct irlan_cb *self, IRLAN_EVENT event,
static int irlan_client_state_info(struct irlan_cb *self, IRLAN_EVENT event, static int irlan_client_state_info(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
...@@ -243,10 +243,10 @@ static int irlan_client_state_info(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -243,10 +243,10 @@ static int irlan_client_state_info(struct irlan_cb *self, IRLAN_EVENT event,
irlan_next_client_state(self, IRLAN_IDLE); irlan_next_client_state(self, IRLAN_IDLE);
break; break;
case IRLAN_WATCHDOG_TIMEOUT: case IRLAN_WATCHDOG_TIMEOUT:
IRDA_DEBUG(2, __FUNCTION__ "(), IRLAN_WATCHDOG_TIMEOUT\n"); IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ );
break; break;
default: default:
IRDA_DEBUG(2, __FUNCTION__ "(), Unknown event %d\n", event); IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event);
break; break;
} }
if (skb) if (skb)
...@@ -265,7 +265,7 @@ static int irlan_client_state_info(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -265,7 +265,7 @@ static int irlan_client_state_info(struct irlan_cb *self, IRLAN_EVENT event,
static int irlan_client_state_media(struct irlan_cb *self, IRLAN_EVENT event, static int irlan_client_state_media(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
...@@ -280,10 +280,10 @@ static int irlan_client_state_media(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -280,10 +280,10 @@ static int irlan_client_state_media(struct irlan_cb *self, IRLAN_EVENT event,
irlan_next_client_state(self, IRLAN_IDLE); irlan_next_client_state(self, IRLAN_IDLE);
break; break;
case IRLAN_WATCHDOG_TIMEOUT: case IRLAN_WATCHDOG_TIMEOUT:
IRDA_DEBUG(2, __FUNCTION__ "(), IRLAN_WATCHDOG_TIMEOUT\n"); IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ );
break; break;
default: default:
IRDA_DEBUG(2, __FUNCTION__ "(), Unknown event %d\n", event); IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event);
break; break;
} }
if (skb) if (skb)
...@@ -304,7 +304,7 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -304,7 +304,7 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event,
{ {
struct qos_info qos; struct qos_info qos;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
...@@ -343,7 +343,7 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -343,7 +343,7 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event,
irlan_next_client_state(self, IRLAN_DATA); irlan_next_client_state(self, IRLAN_DATA);
break; break;
default: default:
IRDA_DEBUG(2, __FUNCTION__ "(), unknown access type!\n"); IRDA_DEBUG(2, "%s(), unknown access type!\n", __FUNCTION__ );
break; break;
} }
break; break;
...@@ -352,10 +352,10 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -352,10 +352,10 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event,
irlan_next_client_state(self, IRLAN_IDLE); irlan_next_client_state(self, IRLAN_IDLE);
break; break;
case IRLAN_WATCHDOG_TIMEOUT: case IRLAN_WATCHDOG_TIMEOUT:
IRDA_DEBUG(2, __FUNCTION__ "(), IRLAN_WATCHDOG_TIMEOUT\n"); IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ );
break; break;
default: default:
IRDA_DEBUG(2, __FUNCTION__ "(), Unknown event %d\n", event); IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event);
break; break;
} }
...@@ -375,7 +375,7 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -375,7 +375,7 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event,
static int irlan_client_state_wait(struct irlan_cb *self, IRLAN_EVENT event, static int irlan_client_state_wait(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
...@@ -389,10 +389,10 @@ static int irlan_client_state_wait(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -389,10 +389,10 @@ static int irlan_client_state_wait(struct irlan_cb *self, IRLAN_EVENT event,
irlan_next_client_state(self, IRLAN_IDLE); irlan_next_client_state(self, IRLAN_IDLE);
break; break;
case IRLAN_WATCHDOG_TIMEOUT: case IRLAN_WATCHDOG_TIMEOUT:
IRDA_DEBUG(2, __FUNCTION__ "(), IRLAN_WATCHDOG_TIMEOUT\n"); IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ );
break; break;
default: default:
IRDA_DEBUG(2, __FUNCTION__ "(), Unknown event %d\n", event); IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event);
break; break;
} }
if (skb) if (skb)
...@@ -406,7 +406,7 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -406,7 +406,7 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event,
{ {
struct qos_info qos; struct qos_info qos;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
...@@ -428,7 +428,7 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -428,7 +428,7 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event,
} else if (self->client.recv_arb_val > } else if (self->client.recv_arb_val >
self->provider.send_arb_val) self->provider.send_arb_val)
{ {
IRDA_DEBUG(2, __FUNCTION__ "(), lost the battle :-(\n"); IRDA_DEBUG(2, "%s(), lost the battle :-(\n", __FUNCTION__ );
} }
break; break;
case IRLAN_DATA_CONNECT_INDICATION: case IRLAN_DATA_CONNECT_INDICATION:
...@@ -439,10 +439,10 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -439,10 +439,10 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event,
irlan_next_client_state(self, IRLAN_IDLE); irlan_next_client_state(self, IRLAN_IDLE);
break; break;
case IRLAN_WATCHDOG_TIMEOUT: case IRLAN_WATCHDOG_TIMEOUT:
IRDA_DEBUG(2, __FUNCTION__ "(), IRLAN_WATCHDOG_TIMEOUT\n"); IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __FUNCTION__ );
break; break;
default: default:
IRDA_DEBUG(2, __FUNCTION__ "(), Unknown event %d\n", event); IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event);
break; break;
} }
if (skb) if (skb)
...@@ -461,7 +461,7 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -461,7 +461,7 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event,
static int irlan_client_state_data(struct irlan_cb *self, IRLAN_EVENT event, static int irlan_client_state_data(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == IRLAN_MAGIC, return -1;); ASSERT(self->magic == IRLAN_MAGIC, return -1;);
...@@ -475,7 +475,7 @@ static int irlan_client_state_data(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -475,7 +475,7 @@ static int irlan_client_state_data(struct irlan_cb *self, IRLAN_EVENT event,
irlan_next_client_state(self, IRLAN_IDLE); irlan_next_client_state(self, IRLAN_IDLE);
break; break;
default: default:
IRDA_DEBUG(2, __FUNCTION__ "(), Unknown event %d\n", event); IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event);
break; break;
} }
if (skb) if (skb)
...@@ -493,7 +493,7 @@ static int irlan_client_state_data(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -493,7 +493,7 @@ static int irlan_client_state_data(struct irlan_cb *self, IRLAN_EVENT event,
static int irlan_client_state_close(struct irlan_cb *self, IRLAN_EVENT event, static int irlan_client_state_close(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
if (skb) if (skb)
dev_kfree_skb(skb); dev_kfree_skb(skb);
...@@ -510,7 +510,7 @@ static int irlan_client_state_close(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -510,7 +510,7 @@ static int irlan_client_state_close(struct irlan_cb *self, IRLAN_EVENT event,
static int irlan_client_state_sync(struct irlan_cb *self, IRLAN_EVENT event, static int irlan_client_state_sync(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
if (skb) if (skb)
dev_kfree_skb(skb); dev_kfree_skb(skb);
......
...@@ -122,7 +122,7 @@ int __init irlan_init(void) ...@@ -122,7 +122,7 @@ int __init irlan_init(void)
struct irlan_cb *new; struct irlan_cb *new;
__u16 hints; __u16 hints;
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
/* Allocate master structure */ /* Allocate master structure */
irlan = hashbin_new(HB_LOCK); /* protect from /proc */ irlan = hashbin_new(HB_LOCK); /* protect from /proc */
if (irlan == NULL) { if (irlan == NULL) {
...@@ -133,7 +133,7 @@ int __init irlan_init(void) ...@@ -133,7 +133,7 @@ int __init irlan_init(void)
create_proc_info_entry("irlan", 0, proc_irda, irlan_proc_read); create_proc_info_entry("irlan", 0, proc_irda, irlan_proc_read);
#endif /* CONFIG_PROC_FS */ #endif /* CONFIG_PROC_FS */
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
hints = irlmp_service_to_hint(S_LAN); hints = irlmp_service_to_hint(S_LAN);
/* Register with IrLMP as a client */ /* Register with IrLMP as a client */
...@@ -157,7 +157,7 @@ int __init irlan_init(void) ...@@ -157,7 +157,7 @@ int __init irlan_init(void)
void __exit irlan_cleanup(void) void __exit irlan_cleanup(void)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
irlmp_unregister_client(ckey); irlmp_unregister_client(ckey);
irlmp_unregister_service(skey); irlmp_unregister_service(skey);
...@@ -181,7 +181,7 @@ int irlan_register_netdev(struct irlan_cb *self) ...@@ -181,7 +181,7 @@ int irlan_register_netdev(struct irlan_cb *self)
{ {
int i=0; int i=0;
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
/* Check if we should call the device eth<x> or irlan<x> */ /* Check if we should call the device eth<x> or irlan<x> */
if (!eth) { if (!eth) {
...@@ -192,7 +192,7 @@ int irlan_register_netdev(struct irlan_cb *self) ...@@ -192,7 +192,7 @@ int irlan_register_netdev(struct irlan_cb *self)
} }
if (register_netdev(&self->dev) != 0) { if (register_netdev(&self->dev) != 0) {
IRDA_DEBUG(2, __FUNCTION__ "(), register_netdev() failed!\n"); IRDA_DEBUG(2, "%s(), register_netdev() failed!\n", __FUNCTION__ );
return -1; return -1;
} }
return 0; return 0;
...@@ -208,7 +208,7 @@ struct irlan_cb *irlan_open(__u32 saddr, __u32 daddr) ...@@ -208,7 +208,7 @@ struct irlan_cb *irlan_open(__u32 saddr, __u32 daddr)
{ {
struct irlan_cb *self; struct irlan_cb *self;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(irlan != NULL, return NULL;); ASSERT(irlan != NULL, return NULL;);
/* /*
...@@ -264,7 +264,7 @@ static void __irlan_close(struct irlan_cb *self) ...@@ -264,7 +264,7 @@ static void __irlan_close(struct irlan_cb *self)
{ {
struct sk_buff *skb; struct sk_buff *skb;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRLAN_MAGIC, return;); ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -301,7 +301,7 @@ void irlan_connect_indication(void *instance, void *sap, struct qos_info *qos, ...@@ -301,7 +301,7 @@ void irlan_connect_indication(void *instance, void *sap, struct qos_info *qos,
struct irlan_cb *self; struct irlan_cb *self;
struct tsap_cb *tsap; struct tsap_cb *tsap;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
self = (struct irlan_cb *) instance; self = (struct irlan_cb *) instance;
tsap = (struct tsap_cb *) sap; tsap = (struct tsap_cb *) sap;
...@@ -390,7 +390,7 @@ void irlan_disconnect_indication(void *instance, void *sap, LM_REASON reason, ...@@ -390,7 +390,7 @@ void irlan_disconnect_indication(void *instance, void *sap, LM_REASON reason,
struct irlan_cb *self; struct irlan_cb *self;
struct tsap_cb *tsap; struct tsap_cb *tsap;
IRDA_DEBUG(0, __FUNCTION__ "(), reason=%d\n", reason); IRDA_DEBUG(0, "%s(), reason=%d\n", __FUNCTION__ , reason);
self = (struct irlan_cb *) instance; self = (struct irlan_cb *) instance;
tsap = (struct tsap_cb *) sap; tsap = (struct tsap_cb *) sap;
...@@ -409,19 +409,19 @@ void irlan_disconnect_indication(void *instance, void *sap, LM_REASON reason, ...@@ -409,19 +409,19 @@ void irlan_disconnect_indication(void *instance, void *sap, LM_REASON reason,
switch (reason) { switch (reason) {
case LM_USER_REQUEST: /* User request */ case LM_USER_REQUEST: /* User request */
IRDA_DEBUG(2, __FUNCTION__ "(), User requested\n"); IRDA_DEBUG(2, "%s(), User requested\n", __FUNCTION__ );
break; break;
case LM_LAP_DISCONNECT: /* Unexpected IrLAP disconnect */ case LM_LAP_DISCONNECT: /* Unexpected IrLAP disconnect */
IRDA_DEBUG(2, __FUNCTION__ "(), Unexpected IrLAP disconnect\n"); IRDA_DEBUG(2, "%s(), Unexpected IrLAP disconnect\n", __FUNCTION__ );
break; break;
case LM_CONNECT_FAILURE: /* Failed to establish IrLAP connection */ case LM_CONNECT_FAILURE: /* Failed to establish IrLAP connection */
IRDA_DEBUG(2, __FUNCTION__ "(), IrLAP connect failed\n"); IRDA_DEBUG(2, "%s(), IrLAP connect failed\n", __FUNCTION__ );
break; break;
case LM_LAP_RESET: /* IrLAP reset */ case LM_LAP_RESET: /* IrLAP reset */
IRDA_DEBUG(2, __FUNCTION__ "(), IrLAP reset\n"); IRDA_DEBUG(2, "%s(), IrLAP reset\n", __FUNCTION__ );
break; break;
case LM_INIT_DISCONNECT: case LM_INIT_DISCONNECT:
IRDA_DEBUG(2, __FUNCTION__ "(), IrLMP connect failed\n"); IRDA_DEBUG(2, "%s(), IrLMP connect failed\n", __FUNCTION__ );
break; break;
default: default:
ERROR("%s(), Unknown disconnect reason\n", __FUNCTION__); ERROR("%s(), Unknown disconnect reason\n", __FUNCTION__);
...@@ -446,7 +446,7 @@ void irlan_open_data_tsap(struct irlan_cb *self) ...@@ -446,7 +446,7 @@ void irlan_open_data_tsap(struct irlan_cb *self)
struct tsap_cb *tsap; struct tsap_cb *tsap;
notify_t notify; notify_t notify;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRLAN_MAGIC, return;); ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -468,7 +468,7 @@ void irlan_open_data_tsap(struct irlan_cb *self) ...@@ -468,7 +468,7 @@ void irlan_open_data_tsap(struct irlan_cb *self)
tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, &notify); tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, &notify);
if (!tsap) { if (!tsap) {
IRDA_DEBUG(2, __FUNCTION__ "(), Got no tsap!\n"); IRDA_DEBUG(2, "%s(), Got no tsap!\n", __FUNCTION__ );
return; return;
} }
self->tsap_data = tsap; self->tsap_data = tsap;
...@@ -482,7 +482,7 @@ void irlan_open_data_tsap(struct irlan_cb *self) ...@@ -482,7 +482,7 @@ void irlan_open_data_tsap(struct irlan_cb *self)
void irlan_close_tsaps(struct irlan_cb *self) void irlan_close_tsaps(struct irlan_cb *self)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRLAN_MAGIC, return;); ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -572,7 +572,7 @@ int irlan_run_ctrl_tx_queue(struct irlan_cb *self) ...@@ -572,7 +572,7 @@ int irlan_run_ctrl_tx_queue(struct irlan_cb *self)
{ {
struct sk_buff *skb; struct sk_buff *skb;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
if (irda_lock(&self->client.tx_busy) == FALSE) if (irda_lock(&self->client.tx_busy) == FALSE)
return -EBUSY; return -EBUSY;
...@@ -591,7 +591,7 @@ int irlan_run_ctrl_tx_queue(struct irlan_cb *self) ...@@ -591,7 +591,7 @@ int irlan_run_ctrl_tx_queue(struct irlan_cb *self)
dev_kfree_skb(skb); dev_kfree_skb(skb);
return -1; return -1;
} }
IRDA_DEBUG(2, __FUNCTION__ "(), sending ...\n"); IRDA_DEBUG(2, "%s(), sending ...\n", __FUNCTION__ );
return irttp_data_request(self->client.tsap_ctrl, skb); return irttp_data_request(self->client.tsap_ctrl, skb);
} }
...@@ -604,7 +604,7 @@ int irlan_run_ctrl_tx_queue(struct irlan_cb *self) ...@@ -604,7 +604,7 @@ int irlan_run_ctrl_tx_queue(struct irlan_cb *self)
*/ */
void irlan_ctrl_data_request(struct irlan_cb *self, struct sk_buff *skb) void irlan_ctrl_data_request(struct irlan_cb *self, struct sk_buff *skb)
{ {
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
/* Queue command */ /* Queue command */
skb_queue_tail(&self->client.txq, skb); skb_queue_tail(&self->client.txq, skb);
...@@ -624,7 +624,7 @@ void irlan_get_provider_info(struct irlan_cb *self) ...@@ -624,7 +624,7 @@ void irlan_get_provider_info(struct irlan_cb *self)
struct sk_buff *skb; struct sk_buff *skb;
__u8 *frame; __u8 *frame;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRLAN_MAGIC, return;); ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -656,7 +656,7 @@ void irlan_open_data_channel(struct irlan_cb *self) ...@@ -656,7 +656,7 @@ void irlan_open_data_channel(struct irlan_cb *self)
struct sk_buff *skb; struct sk_buff *skb;
__u8 *frame; __u8 *frame;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRLAN_MAGIC, return;); ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -688,7 +688,7 @@ void irlan_close_data_channel(struct irlan_cb *self) ...@@ -688,7 +688,7 @@ void irlan_close_data_channel(struct irlan_cb *self)
struct sk_buff *skb; struct sk_buff *skb;
__u8 *frame; __u8 *frame;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRLAN_MAGIC, return;); ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -727,7 +727,7 @@ void irlan_open_unicast_addr(struct irlan_cb *self) ...@@ -727,7 +727,7 @@ void irlan_open_unicast_addr(struct irlan_cb *self)
struct sk_buff *skb; struct sk_buff *skb;
__u8 *frame; __u8 *frame;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRLAN_MAGIC, return;); ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -765,7 +765,7 @@ void irlan_set_broadcast_filter(struct irlan_cb *self, int status) ...@@ -765,7 +765,7 @@ void irlan_set_broadcast_filter(struct irlan_cb *self, int status)
struct sk_buff *skb; struct sk_buff *skb;
__u8 *frame; __u8 *frame;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRLAN_MAGIC, return;); ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -804,7 +804,7 @@ void irlan_set_multicast_filter(struct irlan_cb *self, int status) ...@@ -804,7 +804,7 @@ void irlan_set_multicast_filter(struct irlan_cb *self, int status)
struct sk_buff *skb; struct sk_buff *skb;
__u8 *frame; __u8 *frame;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRLAN_MAGIC, return;); ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -844,7 +844,7 @@ void irlan_get_unicast_addr(struct irlan_cb *self) ...@@ -844,7 +844,7 @@ void irlan_get_unicast_addr(struct irlan_cb *self)
struct sk_buff *skb; struct sk_buff *skb;
__u8 *frame; __u8 *frame;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRLAN_MAGIC, return;); ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -879,7 +879,7 @@ void irlan_get_media_char(struct irlan_cb *self) ...@@ -879,7 +879,7 @@ void irlan_get_media_char(struct irlan_cb *self)
struct sk_buff *skb; struct sk_buff *skb;
__u8 *frame; __u8 *frame;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRLAN_MAGIC, return;); ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -964,7 +964,7 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type, ...@@ -964,7 +964,7 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type,
int n=0; int n=0;
if (skb == NULL) { if (skb == NULL) {
IRDA_DEBUG(2, __FUNCTION__ "(), Got NULL skb\n"); IRDA_DEBUG(2, "%s(), Got NULL skb\n", __FUNCTION__ );
return 0; return 0;
} }
...@@ -981,7 +981,7 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type, ...@@ -981,7 +981,7 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type,
ASSERT(value_len > 0, return 0;); ASSERT(value_len > 0, return 0;);
break; break;
default: default:
IRDA_DEBUG(2, __FUNCTION__ "(), Unknown parameter type!\n"); IRDA_DEBUG(2, "%s(), Unknown parameter type!\n", __FUNCTION__ );
return 0; return 0;
break; break;
} }
...@@ -991,7 +991,7 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type, ...@@ -991,7 +991,7 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type,
/* Make space for data */ /* Make space for data */
if (skb_tailroom(skb) < (param_len+value_len+3)) { if (skb_tailroom(skb) < (param_len+value_len+3)) {
IRDA_DEBUG(2, __FUNCTION__ "(), No more space at end of skb\n"); IRDA_DEBUG(2, "%s(), No more space at end of skb\n", __FUNCTION__ );
return 0; return 0;
} }
skb_put(skb, param_len+value_len+3); skb_put(skb, param_len+value_len+3);
...@@ -1038,13 +1038,13 @@ int irlan_extract_param(__u8 *buf, char *name, char *value, __u16 *len) ...@@ -1038,13 +1038,13 @@ int irlan_extract_param(__u8 *buf, char *name, char *value, __u16 *len)
__u16 val_len; __u16 val_len;
int n=0; int n=0;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
/* get length of parameter name (1 byte) */ /* get length of parameter name (1 byte) */
name_len = buf[n++]; name_len = buf[n++];
if (name_len > 254) { if (name_len > 254) {
IRDA_DEBUG(2, __FUNCTION__ "(), name_len > 254\n"); IRDA_DEBUG(2, "%s(), name_len > 254\n", __FUNCTION__ );
return -RSP_INVALID_COMMAND_FORMAT; return -RSP_INVALID_COMMAND_FORMAT;
} }
...@@ -1061,7 +1061,7 @@ int irlan_extract_param(__u8 *buf, char *name, char *value, __u16 *len) ...@@ -1061,7 +1061,7 @@ int irlan_extract_param(__u8 *buf, char *name, char *value, __u16 *len)
le16_to_cpus(&val_len); n+=2; le16_to_cpus(&val_len); n+=2;
if (val_len > 1016) { if (val_len > 1016) {
IRDA_DEBUG(2, __FUNCTION__ "(), parameter length to long\n"); IRDA_DEBUG(2, "%s(), parameter length to long\n", __FUNCTION__ );
return -RSP_INVALID_COMMAND_FORMAT; return -RSP_INVALID_COMMAND_FORMAT;
} }
*len = val_len; *len = val_len;
......
...@@ -50,7 +50,7 @@ int irlan_eth_init(struct net_device *dev) ...@@ -50,7 +50,7 @@ int irlan_eth_init(struct net_device *dev)
{ {
struct irlan_cb *self; struct irlan_cb *self;
IRDA_DEBUG(2, __FUNCTION__"()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(dev != NULL, return -1;); ASSERT(dev != NULL, return -1;);
...@@ -107,7 +107,7 @@ int irlan_eth_open(struct net_device *dev) ...@@ -107,7 +107,7 @@ int irlan_eth_open(struct net_device *dev)
{ {
struct irlan_cb *self; struct irlan_cb *self;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(dev != NULL, return -1;); ASSERT(dev != NULL, return -1;);
...@@ -143,7 +143,7 @@ int irlan_eth_close(struct net_device *dev) ...@@ -143,7 +143,7 @@ int irlan_eth_close(struct net_device *dev)
struct irlan_cb *self = (struct irlan_cb *) dev->priv; struct irlan_cb *self = (struct irlan_cb *) dev->priv;
struct sk_buff *skb; struct sk_buff *skb;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
/* Stop device */ /* Stop device */
netif_stop_queue(dev); netif_stop_queue(dev);
...@@ -356,14 +356,14 @@ void irlan_eth_set_multicast_list(struct net_device *dev) ...@@ -356,14 +356,14 @@ void irlan_eth_set_multicast_list(struct net_device *dev)
self = dev->priv; self = dev->priv;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRLAN_MAGIC, return;); ASSERT(self->magic == IRLAN_MAGIC, return;);
/* Check if data channel has been connected yet */ /* Check if data channel has been connected yet */
if (self->client.state != IRLAN_DATA) { if (self->client.state != IRLAN_DATA) {
IRDA_DEBUG(1, __FUNCTION__ "(), delaying!\n"); IRDA_DEBUG(1, "%s(), delaying!\n", __FUNCTION__ );
return; return;
} }
...@@ -373,20 +373,20 @@ void irlan_eth_set_multicast_list(struct net_device *dev) ...@@ -373,20 +373,20 @@ void irlan_eth_set_multicast_list(struct net_device *dev)
} }
else if ((dev->flags & IFF_ALLMULTI) || dev->mc_count > HW_MAX_ADDRS) { else if ((dev->flags & IFF_ALLMULTI) || dev->mc_count > HW_MAX_ADDRS) {
/* Disable promiscuous mode, use normal mode. */ /* Disable promiscuous mode, use normal mode. */
IRDA_DEBUG(4, __FUNCTION__ "(), Setting multicast filter\n"); IRDA_DEBUG(4, "%s(), Setting multicast filter\n", __FUNCTION__ );
/* hardware_set_filter(NULL); */ /* hardware_set_filter(NULL); */
irlan_set_multicast_filter(self, TRUE); irlan_set_multicast_filter(self, TRUE);
} }
else if (dev->mc_count) { else if (dev->mc_count) {
IRDA_DEBUG(4, __FUNCTION__ "(), Setting multicast filter\n"); IRDA_DEBUG(4, "%s(), Setting multicast filter\n", __FUNCTION__ );
/* Walk the address list, and load the filter */ /* Walk the address list, and load the filter */
/* hardware_set_filter(dev->mc_list); */ /* hardware_set_filter(dev->mc_list); */
irlan_set_multicast_filter(self, TRUE); irlan_set_multicast_filter(self, TRUE);
} }
else { else {
IRDA_DEBUG(4, __FUNCTION__ "(), Clearing multicast filter\n"); IRDA_DEBUG(4, "%s(), Clearing multicast filter\n", __FUNCTION__ );
irlan_set_multicast_filter(self, FALSE); irlan_set_multicast_filter(self, FALSE);
} }
......
...@@ -40,7 +40,7 @@ char *irlan_state[] = { ...@@ -40,7 +40,7 @@ char *irlan_state[] = {
void irlan_next_client_state(struct irlan_cb *self, IRLAN_STATE state) void irlan_next_client_state(struct irlan_cb *self, IRLAN_STATE state)
{ {
IRDA_DEBUG(2, __FUNCTION__"(), %s\n", irlan_state[state]); IRDA_DEBUG(2, "%s(), %s\n", __FUNCTION__ , irlan_state[state]);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRLAN_MAGIC, return;); ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -50,7 +50,7 @@ void irlan_next_client_state(struct irlan_cb *self, IRLAN_STATE state) ...@@ -50,7 +50,7 @@ void irlan_next_client_state(struct irlan_cb *self, IRLAN_STATE state)
void irlan_next_provider_state(struct irlan_cb *self, IRLAN_STATE state) void irlan_next_provider_state(struct irlan_cb *self, IRLAN_STATE state)
{ {
IRDA_DEBUG(2, __FUNCTION__"(), %s\n", irlan_state[state]); IRDA_DEBUG(2, "%s(), %s\n", __FUNCTION__ , irlan_state[state]);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRLAN_MAGIC, return;); ASSERT(self->magic == IRLAN_MAGIC, return;);
......
...@@ -143,7 +143,7 @@ void irlan_check_command_param(struct irlan_cb *self, char *param, char *value) ...@@ -143,7 +143,7 @@ void irlan_check_command_param(struct irlan_cb *self, char *param, char *value)
{ {
__u8 *bytes; __u8 *bytes;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
bytes = value; bytes = value;
...@@ -156,7 +156,7 @@ void irlan_check_command_param(struct irlan_cb *self, char *param, char *value) ...@@ -156,7 +156,7 @@ void irlan_check_command_param(struct irlan_cb *self, char *param, char *value)
* This is experimental!! DB. * This is experimental!! DB.
*/ */
if (strcmp(param, "MODE") == 0) { if (strcmp(param, "MODE") == 0) {
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
self->use_udata = TRUE; self->use_udata = TRUE;
return; return;
} }
......
...@@ -70,7 +70,7 @@ static int irlan_provider_data_indication(void *instance, void *sap, ...@@ -70,7 +70,7 @@ static int irlan_provider_data_indication(void *instance, void *sap,
struct irlan_cb *self; struct irlan_cb *self;
__u8 code; __u8 code;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
self = (struct irlan_cb *) instance; self = (struct irlan_cb *) instance;
...@@ -99,15 +99,15 @@ static int irlan_provider_data_indication(void *instance, void *sap, ...@@ -99,15 +99,15 @@ static int irlan_provider_data_indication(void *instance, void *sap,
irlan_do_provider_event(self, IRLAN_FILTER_CONFIG_CMD, skb); irlan_do_provider_event(self, IRLAN_FILTER_CONFIG_CMD, skb);
break; break;
case CMD_RECONNECT_DATA_CHAN: case CMD_RECONNECT_DATA_CHAN:
IRDA_DEBUG(2, __FUNCTION__"(), Got RECONNECT_DATA_CHAN command\n"); IRDA_DEBUG(2, "%s(), Got RECONNECT_DATA_CHAN command\n", __FUNCTION__ );
IRDA_DEBUG(2, __FUNCTION__"(), NOT IMPLEMENTED\n"); IRDA_DEBUG(2, "%s(), NOT IMPLEMENTED\n", __FUNCTION__ );
break; break;
case CMD_CLOSE_DATA_CHAN: case CMD_CLOSE_DATA_CHAN:
IRDA_DEBUG(2, "Got CLOSE_DATA_CHAN command!\n"); IRDA_DEBUG(2, "Got CLOSE_DATA_CHAN command!\n");
IRDA_DEBUG(2, __FUNCTION__"(), NOT IMPLEMENTED\n"); IRDA_DEBUG(2, "%s(), NOT IMPLEMENTED\n", __FUNCTION__ );
break; break;
default: default:
IRDA_DEBUG(2, __FUNCTION__ "(), Unknown command!\n"); IRDA_DEBUG(2, "%s(), Unknown command!\n", __FUNCTION__ );
break; break;
} }
return 0; return 0;
...@@ -129,7 +129,7 @@ static void irlan_provider_connect_indication(void *instance, void *sap, ...@@ -129,7 +129,7 @@ static void irlan_provider_connect_indication(void *instance, void *sap,
struct tsap_cb *tsap; struct tsap_cb *tsap;
__u32 saddr, daddr; __u32 saddr, daddr;
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
self = (struct irlan_cb *) instance; self = (struct irlan_cb *) instance;
tsap = (struct tsap_cb *) sap; tsap = (struct tsap_cb *) sap;
...@@ -182,7 +182,7 @@ void irlan_provider_disconnect_indication(void *instance, void *sap, ...@@ -182,7 +182,7 @@ void irlan_provider_disconnect_indication(void *instance, void *sap,
struct irlan_cb *self; struct irlan_cb *self;
struct tsap_cb *tsap; struct tsap_cb *tsap;
IRDA_DEBUG(4, __FUNCTION__ "(), reason=%d\n", reason); IRDA_DEBUG(4, "%s(), reason=%d\n", __FUNCTION__ , reason);
self = (struct irlan_cb *) instance; self = (struct irlan_cb *) instance;
tsap = (struct tsap_cb *) sap; tsap = (struct tsap_cb *) sap;
...@@ -236,7 +236,7 @@ int irlan_provider_parse_command(struct irlan_cb *self, int cmd, ...@@ -236,7 +236,7 @@ int irlan_provider_parse_command(struct irlan_cb *self, int cmd,
ASSERT(skb != NULL, return -RSP_PROTOCOL_ERROR;); ASSERT(skb != NULL, return -RSP_PROTOCOL_ERROR;);
IRDA_DEBUG(4, __FUNCTION__ "(), skb->len=%d\n", (int)skb->len); IRDA_DEBUG(4, "%s(), skb->len=%d\n", __FUNCTION__ , (int)skb->len);
ASSERT(self != NULL, return -RSP_PROTOCOL_ERROR;); ASSERT(self != NULL, return -RSP_PROTOCOL_ERROR;);
ASSERT(self->magic == IRLAN_MAGIC, return -RSP_PROTOCOL_ERROR;); ASSERT(self->magic == IRLAN_MAGIC, return -RSP_PROTOCOL_ERROR;);
...@@ -266,7 +266,7 @@ int irlan_provider_parse_command(struct irlan_cb *self, int cmd, ...@@ -266,7 +266,7 @@ int irlan_provider_parse_command(struct irlan_cb *self, int cmd,
for (i=0; i<count;i++) { for (i=0; i<count;i++) {
ret = irlan_extract_param(ptr, name, value, &val_len); ret = irlan_extract_param(ptr, name, value, &val_len);
if (ret < 0) { if (ret < 0) {
IRDA_DEBUG(2, __FUNCTION__ "(), IrLAN, Error!\n"); IRDA_DEBUG(2, "%s(), IrLAN, Error!\n", __FUNCTION__ );
break; break;
} }
ptr+=ret; ptr+=ret;
...@@ -291,7 +291,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command, ...@@ -291,7 +291,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command,
{ {
struct sk_buff *skb; struct sk_buff *skb;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IRLAN_MAGIC, return;); ASSERT(self->magic == IRLAN_MAGIC, return;);
...@@ -316,7 +316,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command, ...@@ -316,7 +316,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command,
irlan_insert_string_param(skb, "MEDIA", "802.5"); irlan_insert_string_param(skb, "MEDIA", "802.5");
break; break;
default: default:
IRDA_DEBUG(2, __FUNCTION__ "(), unknown media type!\n"); IRDA_DEBUG(2, "%s(), unknown media type!\n", __FUNCTION__ );
break; break;
} }
irlan_insert_short_param(skb, "IRLAN_VER", 0x0101); irlan_insert_short_param(skb, "IRLAN_VER", 0x0101);
...@@ -340,7 +340,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command, ...@@ -340,7 +340,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command,
irlan_insert_string_param(skb, "ACCESS_TYPE", "HOSTED"); irlan_insert_string_param(skb, "ACCESS_TYPE", "HOSTED");
break; break;
default: default:
IRDA_DEBUG(2, __FUNCTION__ "(), Unknown access type\n"); IRDA_DEBUG(2, "%s(), Unknown access type\n", __FUNCTION__ );
break; break;
} }
irlan_insert_short_param(skb, "MAX_FRAME", 0x05ee); irlan_insert_short_param(skb, "MAX_FRAME", 0x05ee);
...@@ -361,7 +361,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command, ...@@ -361,7 +361,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command,
handle_filter_request(self, skb); handle_filter_request(self, skb);
break; break;
default: default:
IRDA_DEBUG(2, __FUNCTION__ "(), Unknown command!\n"); IRDA_DEBUG(2, "%s(), Unknown command!\n", __FUNCTION__ );
break; break;
} }
...@@ -379,7 +379,7 @@ int irlan_provider_open_ctrl_tsap(struct irlan_cb *self) ...@@ -379,7 +379,7 @@ int irlan_provider_open_ctrl_tsap(struct irlan_cb *self)
struct tsap_cb *tsap; struct tsap_cb *tsap;
notify_t notify; notify_t notify;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == IRLAN_MAGIC, return -1;); ASSERT(self->magic == IRLAN_MAGIC, return -1;);
...@@ -400,7 +400,7 @@ int irlan_provider_open_ctrl_tsap(struct irlan_cb *self) ...@@ -400,7 +400,7 @@ int irlan_provider_open_ctrl_tsap(struct irlan_cb *self)
tsap = irttp_open_tsap(LSAP_ANY, 1, &notify); tsap = irttp_open_tsap(LSAP_ANY, 1, &notify);
if (!tsap) { if (!tsap) {
IRDA_DEBUG(2, __FUNCTION__ "(), Got no tsap!\n"); IRDA_DEBUG(2, "%s(), Got no tsap!\n", __FUNCTION__ );
return -1; return -1;
} }
self->provider.tsap_ctrl = tsap; self->provider.tsap_ctrl = tsap;
......
...@@ -72,7 +72,7 @@ void irlan_do_provider_event(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -72,7 +72,7 @@ void irlan_do_provider_event(struct irlan_cb *self, IRLAN_EVENT event,
static int irlan_provider_state_idle(struct irlan_cb *self, IRLAN_EVENT event, static int irlan_provider_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
...@@ -82,7 +82,7 @@ static int irlan_provider_state_idle(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -82,7 +82,7 @@ static int irlan_provider_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
irlan_next_provider_state( self, IRLAN_INFO); irlan_next_provider_state( self, IRLAN_INFO);
break; break;
default: default:
IRDA_DEBUG(4, __FUNCTION__ "(), Unknown event %d\n", event); IRDA_DEBUG(4, "%s(), Unknown event %d\n", __FUNCTION__ , event);
break; break;
} }
if (skb) if (skb)
...@@ -101,7 +101,7 @@ static int irlan_provider_state_info(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -101,7 +101,7 @@ static int irlan_provider_state_info(struct irlan_cb *self, IRLAN_EVENT event,
{ {
int ret; int ret;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
...@@ -147,7 +147,7 @@ static int irlan_provider_state_info(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -147,7 +147,7 @@ static int irlan_provider_state_info(struct irlan_cb *self, IRLAN_EVENT event,
irlan_next_provider_state(self, IRLAN_IDLE); irlan_next_provider_state(self, IRLAN_IDLE);
break; break;
default: default:
IRDA_DEBUG( 0, __FUNCTION__ "(), Unknown event %d\n", event); IRDA_DEBUG( 0, "%s(), Unknown event %d\n", __FUNCTION__ , event);
break; break;
} }
if (skb) if (skb)
...@@ -166,7 +166,7 @@ static int irlan_provider_state_info(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -166,7 +166,7 @@ static int irlan_provider_state_info(struct irlan_cb *self, IRLAN_EVENT event,
static int irlan_provider_state_open(struct irlan_cb *self, IRLAN_EVENT event, static int irlan_provider_state_open(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
...@@ -186,7 +186,7 @@ static int irlan_provider_state_open(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -186,7 +186,7 @@ static int irlan_provider_state_open(struct irlan_cb *self, IRLAN_EVENT event,
irlan_next_provider_state(self, IRLAN_IDLE); irlan_next_provider_state(self, IRLAN_IDLE);
break; break;
default: default:
IRDA_DEBUG(2, __FUNCTION__ "(), Unknown event %d\n", event); IRDA_DEBUG(2, "%s(), Unknown event %d\n", __FUNCTION__ , event);
break; break;
} }
if (skb) if (skb)
...@@ -205,7 +205,7 @@ static int irlan_provider_state_open(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -205,7 +205,7 @@ static int irlan_provider_state_open(struct irlan_cb *self, IRLAN_EVENT event,
static int irlan_provider_state_data(struct irlan_cb *self, IRLAN_EVENT event, static int irlan_provider_state_data(struct irlan_cb *self, IRLAN_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == IRLAN_MAGIC, return -1;); ASSERT(self->magic == IRLAN_MAGIC, return -1;);
...@@ -221,7 +221,7 @@ static int irlan_provider_state_data(struct irlan_cb *self, IRLAN_EVENT event, ...@@ -221,7 +221,7 @@ static int irlan_provider_state_data(struct irlan_cb *self, IRLAN_EVENT event,
irlan_next_provider_state(self, IRLAN_IDLE); irlan_next_provider_state(self, IRLAN_IDLE);
break; break;
default: default:
IRDA_DEBUG( 0, __FUNCTION__ "(), Unknown event %d\n", event); IRDA_DEBUG( 0, "%s(), Unknown event %d\n", __FUNCTION__ , event);
break; break;
} }
if (skb) if (skb)
......
...@@ -326,29 +326,29 @@ ...@@ -326,29 +326,29 @@
* compiler will optimise away the if() in all cases. * compiler will optimise away the if() in all cases.
*/ */
/* All error messages (will show up in the normal logs) */ /* All error messages (will show up in the normal logs) */
#define DERROR(dbg, args...) \ #define DERROR(dbg, format, args...) \
{if(DEBUG_##dbg) \ {if(DEBUG_##dbg) \
printk(KERN_INFO "irnet: " __FUNCTION__ "(): " args);} printk(KERN_INFO "irnet: %s(): " format, __FUNCTION__ , ##args);}
/* Normal debug message (will show up in /var/log/debug) */ /* Normal debug message (will show up in /var/log/debug) */
#define DEBUG(dbg, args...) \ #define DEBUG(dbg, format, args...) \
{if(DEBUG_##dbg) \ {if(DEBUG_##dbg) \
printk(KERN_DEBUG "irnet: " __FUNCTION__ "(): " args);} printk(KERN_DEBUG "irnet: %s(): " format, __FUNCTION__ , ##args);}
/* Entering a function (trace) */ /* Entering a function (trace) */
#define DENTER(dbg, args...) \ #define DENTER(dbg, format, args...) \
{if(DEBUG_##dbg) \ {if(DEBUG_##dbg) \
printk(KERN_DEBUG "irnet: ->" __FUNCTION__ args);} printk(KERN_DEBUG "irnet: -> %s" format, __FUNCTION__ , ##args);}
/* Entering and exiting a function in one go (trace) */ /* Entering and exiting a function in one go (trace) */
#define DPASS(dbg, args...) \ #define DPASS(dbg, format, args...) \
{if(DEBUG_##dbg) \ {if(DEBUG_##dbg) \
printk(KERN_DEBUG "irnet: <>" __FUNCTION__ args);} printk(KERN_DEBUG "irnet: <>%s" format, __FUNCTION__ , ##args);}
/* Exiting a function (trace) */ /* Exiting a function (trace) */
#define DEXIT(dbg, args...) \ #define DEXIT(dbg, format, args...) \
{if(DEBUG_##dbg) \ {if(DEBUG_##dbg) \
printk(KERN_DEBUG "irnet: <-" __FUNCTION__ "()" args);} printk(KERN_DEBUG "irnet: <-%s()" format, __FUNCTION__ , ##args);}
/* Exit a function with debug */ /* Exit a function with debug */
#define DRETURN(ret, dbg, args...) \ #define DRETURN(ret, dbg, args...) \
......
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