git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
net
/
irda
/
w83977af_ir.c
diff --git
a/drivers/net/irda/w83977af_ir.c
b/drivers/net/irda/w83977af_ir.c
index
6968584
..
4212657
100644
(file)
--- a/
drivers/net/irda/w83977af_ir.c
+++ b/
drivers/net/irda/w83977af_ir.c
@@
-40,7
+40,6
@@
********************************************************************/
#include <linux/module.h>
********************************************************************/
#include <linux/module.h>
-#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/skbuff.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/skbuff.h>
@@
-117,7
+116,7
@@
static int __init w83977af_init(void)
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
- for (i=0; (io[i] < 2000) && (i <
4); i++) {
+ for (i=0; (io[i] < 2000) && (i <
ARRAY_SIZE(dev_self)); i++) {
if (w83977af_open(i, io[i], irq[i], dma[i]) == 0)
return 0;
}
if (w83977af_open(i, io[i], irq[i], dma[i]) == 0)
return 0;
}
@@
-136,7
+135,7
@@
static void __exit w83977af_cleanup(void)
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
- for (i=0; i <
4
; i++) {
+ for (i=0; i <
ARRAY_SIZE(dev_self)
; i++) {
if (dev_self[i])
w83977af_close(dev_self[i]);
}
if (dev_self[i])
w83977af_close(dev_self[i]);
}
@@
-245,10
+244,10
@@
int w83977af_open(int i, unsigned int iobase, unsigned int irq,
err = register_netdev(dev);
if (err) {
err = register_netdev(dev);
if (err) {
- ERROR("%s(), register_netdevice() failed!\n", __FUNCTION__);
+
IRDA_
ERROR("%s(), register_netdevice() failed!\n", __FUNCTION__);
goto err_out3;
}
goto err_out3;
}
- MESSAGE("IrDA: Registered device %s\n", dev->name);
+
IRDA_
MESSAGE("IrDA: Registered device %s\n", dev->name);
/* Need to store self somewhere */
dev_self[i] = self;
/* Need to store self somewhere */
dev_self[i] = self;
@@
-401,8
+400,8
@@
int w83977af_probe( int iobase, int irq, int dma)
switch_bank(iobase, SET7);
outb(0x40, iobase+7);
switch_bank(iobase, SET7);
outb(0x40, iobase+7);
- MESSAGE("W83977AF (IR) driver loaded. "
- "Version: 0x%02x\n", version);
+
IRDA_
MESSAGE("W83977AF (IR) driver loaded. "
+
"Version: 0x%02x\n", version);
return 0;
} else {
return 0;
} else {
@@
-691,7
+690,7
@@
static void w83977af_dma_xmit_complete(struct w83977af_ir *self)
IRDA_DEBUG(4, "%s(%ld)\n", __FUNCTION__ , jiffies);
IRDA_DEBUG(4, "%s(%ld)\n", __FUNCTION__ , jiffies);
- ASSERT(self != NULL, return;);
+
IRDA_
ASSERT(self != NULL, return;);
iobase = self->io.fir_base;
iobase = self->io.fir_base;
@@
-743,7
+742,7
@@
int w83977af_dma_receive(struct w83977af_ir *self)
unsigned long flags;
__u8 hcr;
#endif
unsigned long flags;
__u8 hcr;
#endif
- ASSERT(self != NULL, return -1;);
+
IRDA_
ASSERT(self != NULL, return -1;);
IRDA_DEBUG(4, "%s\n", __FUNCTION__ );
IRDA_DEBUG(4, "%s\n", __FUNCTION__ );
@@
-945,7
+944,7
@@
static void w83977af_pio_receive(struct w83977af_ir *self)
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
- ASSERT(self != NULL, return;);
+
IRDA_
ASSERT(self != NULL, return;);
iobase = self->io.fir_base;
iobase = self->io.fir_base;
@@
-1112,20
+1111,14
@@
static __u8 w83977af_fir_interrupt(struct w83977af_ir *self, int isr)
* An interrupt from the chip has arrived. Time to do some work
*
*/
* An interrupt from the chip has arrived. Time to do some work
*
*/
-static irqreturn_t w83977af_interrupt(int irq, void *dev_id,
- struct pt_regs *regs)
+static irqreturn_t w83977af_interrupt(int irq, void *dev_id)
{
{
- struct net_device *dev =
(struct net_device *)
dev_id;
+ struct net_device *dev = dev_id;
struct w83977af_ir *self;
__u8 set, icr, isr;
int iobase;
struct w83977af_ir *self;
__u8 set, icr, isr;
int iobase;
- if (!dev) {
- printk(KERN_WARNING "%s: irq %d for unknown device.\n",
- driver_name, irq);
- return IRQ_NONE;
- }
- self = (struct w83977af_ir *) dev->priv;
+ self = dev->priv;
iobase = self->io.fir_base;
iobase = self->io.fir_base;
@@
-1163,7
+1156,7
@@
static int w83977af_is_receiving(struct w83977af_ir *self)
int iobase;
__u8 set;
int iobase;
__u8 set;
- ASSERT(self != NULL, return FALSE;);
+
IRDA_
ASSERT(self != NULL, return FALSE;);
if (self->io.speed > 115200) {
iobase = self->io.fir_base;
if (self->io.speed > 115200) {
iobase = self->io.fir_base;
@@
-1197,10
+1190,10
@@
static int w83977af_net_open(struct net_device *dev)
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
- ASSERT(dev != NULL, return -1;);
+
IRDA_
ASSERT(dev != NULL, return -1;);
self = (struct w83977af_ir *) dev->priv;
self = (struct w83977af_ir *) dev->priv;
- ASSERT(self != NULL, return 0;);
+
IRDA_
ASSERT(self != NULL, return 0;);
iobase = self->io.fir_base;
iobase = self->io.fir_base;
@@
-1260,11
+1253,11
@@
static int w83977af_net_close(struct net_device *dev)
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
- ASSERT(dev != NULL, return -1;);
+
IRDA_
ASSERT(dev != NULL, return -1;);
self = (struct w83977af_ir *) dev->priv;
self = (struct w83977af_ir *) dev->priv;
- ASSERT(self != NULL, return 0;);
+
IRDA_
ASSERT(self != NULL, return 0;);
iobase = self->io.fir_base;
iobase = self->io.fir_base;
@@
-1307,11
+1300,11
@@
static int w83977af_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
unsigned long flags;
int ret = 0;
unsigned long flags;
int ret = 0;
- ASSERT(dev != NULL, return -1;);
+
IRDA_
ASSERT(dev != NULL, return -1;);
self = dev->priv;
self = dev->priv;
- ASSERT(self != NULL, return -1;);
+
IRDA_
ASSERT(self != NULL, return -1;);
IRDA_DEBUG(2, "%s(), %s, (cmd=0x%X)\n", __FUNCTION__ , dev->name, cmd);
IRDA_DEBUG(2, "%s(), %s, (cmd=0x%X)\n", __FUNCTION__ , dev->name, cmd);