patch-2.4.20 linux-2.4.20/drivers/net/irda/smc-ircc.c
Next file: linux-2.4.20/drivers/net/irda/tekram.c
Previous file: linux-2.4.20/drivers/net/irda/nsc-ircc.c
Back to the patch index
Back to the overall index
- Lines: 320
- Date:
Thu Nov 28 15:53:13 2002
- Orig file:
linux-2.4.19/drivers/net/irda/smc-ircc.c
- Orig date:
Thu Oct 4 18:41:09 2001
diff -urN linux-2.4.19/drivers/net/irda/smc-ircc.c linux-2.4.20/drivers/net/irda/smc-ircc.c
@@ -170,7 +170,7 @@
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);
@@ -184,7 +184,7 @@
{
u8 devid,xdevid,rev;
- IRDA_DEBUG(0, __FUNCTION__ "()\n");
+ IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
/* Leave configuration */
@@ -263,7 +263,7 @@
u8 mode;
int ret = -ENODEV;
- IRDA_DEBUG(0, __FUNCTION__ "()\n");
+ IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
if (smc_probe(cfg_base,0xD,chips,type)==NULL)
return ret;
@@ -307,7 +307,7 @@
unsigned short sir_io;
int ret = -ENODEV;
- IRDA_DEBUG(0, __FUNCTION__ "()\n");
+ IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
if (smc_probe(cfg_base,0x20,chips,type)==NULL)
return ret;
@@ -343,8 +343,8 @@
static int __init smc_superio_fdc(unsigned short cfg_base)
{
if (check_region(cfg_base, 2) < 0) {
- IRDA_DEBUG(0, __FUNCTION__ ": can't get cfg_base of 0x%03x\n",
- cfg_base);
+ IRDA_DEBUG(0, "%s: can't get cfg_base of 0x%03x\n",
+ __FUNCTION__, cfg_base);
return -1;
}
@@ -358,8 +358,8 @@
{
#if 0
if (check_region(cfg_base, 2) < 0) {
- IRDA_DEBUG(0, __FUNCTION__ ": can't get cfg_base of 0x%03x\n",
- cfg_base);
+ IRDA_DEBUG(0, "%s: can't get cfg_base of 0x%03x\n",
+ __FUNCTION__, cfg_base);
return -1;
}
#endif
@@ -380,7 +380,7 @@
{
int ret=-ENODEV;
- IRDA_DEBUG(0, __FUNCTION__ "\n");
+ IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
dev_count=0;
@@ -403,8 +403,7 @@
/* Trys to open for all the SMC chipsets we know about */
- IRDA_DEBUG(0, __FUNCTION__
- " Try to open all known SMC chipsets\n");
+ IRDA_DEBUG(0, "%s Try to open all known SMC chipsets\n", __FUNCTION__);
if (!smc_superio_fdc(0x3f0))
ret=0;
@@ -433,17 +432,17 @@
unsigned char low, high, chip, config, dma, irq, version;
- IRDA_DEBUG(0, __FUNCTION__ "\n");
+ IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
if (check_region(fir_base, CHIP_IO_EXTENT) < 0) {
- IRDA_DEBUG(0, __FUNCTION__ ": can't get fir_base of 0x%03x\n",
- fir_base);
+ IRDA_DEBUG(0, "%s: can't get fir_base of 0x%03x\n",
+ __FUNCTION__, fir_base);
return -ENODEV;
}
#if POSSIBLE_USED_BY_SERIAL_DRIVER
if (check_region(sir_base, CHIP_IO_EXTENT) < 0) {
- IRDA_DEBUG(0, __FUNCTION__ ": can't get sir_base of 0x%03x\n",
- sir_base);
+ IRDA_DEBUG(0, "%s: can't get sir_base of 0x%03x\n",
+ __FUNCTION__, sir_base);
return -ENODEV;
}
#endif
@@ -460,8 +459,8 @@
dma = config & 0x0f;
if (high != 0x10 || low != 0xb8 || (chip != 0xf1 && chip != 0xf2)) {
- IRDA_DEBUG(0, __FUNCTION__
- "(), addr 0x%04x - no device found!\n", fir_base);
+ IRDA_DEBUG(0, "%s(), addr 0x%04x - no device found!\n",
+ __FUNCTION__, fir_base);
return -ENODEV;
}
MESSAGE("SMC IrDA Controller found\n IrCC version %d.%d, "
@@ -469,8 +468,7 @@
chip & 0x0f, version, fir_base, sir_base, dma, irq);
if (dev_count>DIM(dev_self)) {
- IRDA_DEBUG(0, __FUNCTION__
- "(), to many devices!\n");
+ IRDA_DEBUG(0, "%s(), to many devices!\n", __FUNCTION__);
return -ENOMEM;
}
@@ -605,7 +603,7 @@
struct ircc_cb *self = (struct ircc_cb *) priv;
struct net_device *dev;
- IRDA_DEBUG(0, __FUNCTION__ "\n");
+ IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;);
@@ -620,8 +618,8 @@
switch (speed) {
default:
- IRDA_DEBUG(0, __FUNCTION__ "(), unknown baud rate of %d\n",
- speed);
+ IRDA_DEBUG(0, "%s(), unknown baud rate of %d\n",
+ __FUNCTION__, speed);
/* FALLTHROUGH */
case 9600:
case 19200:
@@ -636,19 +634,19 @@
ir_mode = IRCC_CFGA_IRDA_HDLC;
ctrl = IRCC_CRC;
fast = 0;
- IRDA_DEBUG(0, __FUNCTION__ "(), handling baud of 576000\n");
+ IRDA_DEBUG(0, "%s(), handling baud of 576000\n", __FUNCTION__);
break;
case 1152000:
ir_mode = IRCC_CFGA_IRDA_HDLC;
ctrl = IRCC_1152 | IRCC_CRC;
fast = 0;
- IRDA_DEBUG(0, __FUNCTION__ "(), handling baud of 1152000\n");
+ IRDA_DEBUG(0, "%s(), handling baud of 1152000\n", __FUNCTION__);
break;
case 4000000:
ir_mode = IRCC_CFGA_IRDA_4PPM;
ctrl = IRCC_CRC;
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;
}
@@ -676,8 +674,7 @@
dev->hard_start_xmit = &irport_hard_xmit;
irport_start(self->irport);
- IRDA_DEBUG(0, __FUNCTION__
- "(), using irport to change speed to %d\n", speed);
+ IRDA_DEBUG(0, "%s(), using irport to change speed to %d\n", __FUNCTION__, speed);
irport_change_speed(self->irport, speed);
}
@@ -779,7 +776,7 @@
{
u8 ctrl;
- IRDA_DEBUG(2, __FUNCTION__ "\n");
+ IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
#if 0
/* Disable Rx */
register_bank(iobase, 0);
@@ -829,7 +826,7 @@
*/
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
/* Disable Tx */
register_bank(iobase, 0);
@@ -915,7 +912,7 @@
struct sk_buff *skb;
int len, msgcnt;
- IRDA_DEBUG(2, __FUNCTION__ "\n");
+ IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
#if 0
/* Disable Rx */
register_bank(iobase, 0);
@@ -924,8 +921,8 @@
register_bank(iobase, 0);
msgcnt = inb(iobase+IRCC_LCR_B) & 0x08;
- IRDA_DEBUG(2, __FUNCTION__ ": dma count = %d\n",
- get_dma_residue(self->io->dma));
+ IRDA_DEBUG(2, "%s: dma count = %d\n",
+ __FUNCTION__, get_dma_residue(self->io->dma));
len = self->rx_buff.truesize - get_dma_residue(self->io->dma);
@@ -936,14 +933,14 @@
len -= 4;
if ((len < 2) || (len > 2050)) {
- WARNING(__FUNCTION__ "(), bogus len=%d\n", len);
+ WARNING("%s(), bogus len=%d\n", __FUNCTION__, len);
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);
if (!skb) {
- WARNING(__FUNCTION__ "(), memory squeeze, dropping frame.\n");
+ WARNING("%s(), memory squeeze, dropping frame.\n", __FUNCTION__);
return;
}
/* Make sure IP header gets aligned */
@@ -997,7 +994,7 @@
/* Disable interrupts */
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 (self->io->direction == IO_RECV)
@@ -1027,12 +1024,12 @@
int status = FALSE;
/* int iobase; */
- IRDA_DEBUG(0, __FUNCTION__ "\n");
+ IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return FALSE;);
- IRDA_DEBUG(0, __FUNCTION__ ": dma count = %d\n",
- get_dma_residue(self->io->dma));
+ IRDA_DEBUG(0, "%s: dma count = %d\n",
+ __FUNCTION__, get_dma_residue(self->io->dma));
status = (self->rx_buff.state != OUTSIDE_FRAME);
@@ -1052,7 +1049,7 @@
struct ircc_cb *self;
int iobase;
- IRDA_DEBUG(0, __FUNCTION__ "\n");
+ IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
ASSERT(dev != NULL, return -1;);
irport = (struct irport_cb *) dev->priv;
@@ -1071,7 +1068,7 @@
if (request_dma(self->io->dma, dev->name)) {
irport_net_close(dev);
- WARNING(__FUNCTION__ "(), unable to allocate DMA=%d\n", self->io->dma);
+ WARNING("%s(), unable to allocate DMA=%d\n", __FUNCTION__, self->io->dma);
return -EAGAIN;
}
@@ -1092,7 +1089,7 @@
struct ircc_cb *self;
int iobase;
- IRDA_DEBUG(0, __FUNCTION__ "\n");
+ IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
ASSERT(dev != NULL, return -1;);
irport = (struct irport_cb *) dev->priv;
@@ -1170,7 +1167,7 @@
{
int iobase;
- IRDA_DEBUG(0, __FUNCTION__ "\n");
+ IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return -1;);
@@ -1190,8 +1187,8 @@
outb(IRCC_CFGB_IR, iobase+IRCC_SCE_CFGB);
#endif
/* Release the PORT that this driver is using */
- IRDA_DEBUG(0, __FUNCTION__ "(), releasing 0x%03x\n",
- self->io->fir_base);
+ IRDA_DEBUG(0, "%s(), releasing 0x%03x\n",
+ __FUNCTION__, self->io->fir_base);
release_region(self->io->fir_base, self->io->fir_ext);
@@ -1207,7 +1204,7 @@
}
#endif /* MODULE */
-int __init smc_init(void)
+static int __init smc_init(void)
{
return ircc_init();
}
@@ -1216,7 +1213,7 @@
{
int i;
- IRDA_DEBUG(0, __FUNCTION__ "\n");
+ IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
for (i=0; i < 2; i++) {
if (dev_self[i])
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)