diff options
Diffstat (limited to 'drivers/net/irda/donauboe.c')
| -rw-r--r-- | drivers/net/irda/donauboe.c | 24 | 
1 files changed, 11 insertions, 13 deletions
diff --git a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c index b626cccbccd..768dfe9a931 100644 --- a/drivers/net/irda/donauboe.c +++ b/drivers/net/irda/donauboe.c @@ -56,7 +56,7 @@  /* do_probe module parameter Enable this code */  /* Probe code is very useful for understanding how the hardware works */  /* Use it with various combinations of TT_LEN, RX_LEN */ -/* Strongly recomended, disable if the probe fails on your machine */ +/* Strongly recommended, disable if the probe fails on your machine */  /* and send me <james@fishsoup.dhs.org> the output of dmesg */  #define USE_PROBE 1  #undef  USE_PROBE @@ -152,10 +152,10 @@  #include <linux/delay.h>  #include <linux/slab.h>  #include <linux/init.h> +#include <linux/interrupt.h>  #include <linux/pci.h>  #include <linux/rtnetlink.h> -#include <asm/system.h>  #include <asm/io.h>  #include <net/irda/wrapper.h> @@ -196,7 +196,7 @@ static char *driver_name = DRIVER_NAME;  static int max_baud = 4000000;  #ifdef USE_PROBE -static int do_probe = 0; +static bool do_probe = false;  #endif @@ -818,9 +818,9 @@ toshoboe_probe (struct toshoboe_cb *self)  {    int i, j, n;  #ifdef USE_MIR -  int bauds[] = { 9600, 115200, 4000000, 1152000 }; +  static const int bauds[] = { 9600, 115200, 4000000, 1152000 };  #else -  int bauds[] = { 9600, 115200, 4000000 }; +  static const int bauds[] = { 9600, 115200, 4000000 };  #endif    unsigned long flags; @@ -1352,7 +1352,7 @@ toshoboe_net_open (struct net_device *dev)      return 0;    rc = request_irq (self->io.irq, toshoboe_interrupt, -                    IRQF_SHARED | IRQF_DISABLED, dev->name, self); +                    IRQF_SHARED, dev->name, self);    if (rc)    	return rc; @@ -1488,7 +1488,7 @@ static void  toshoboe_close (struct pci_dev *pci_dev)  {    int i; -  struct toshoboe_cb *self = (struct toshoboe_cb*)pci_get_drvdata(pci_dev); +  struct toshoboe_cb *self = pci_get_drvdata(pci_dev);    IRDA_DEBUG (4, "%s()\n", __func__); @@ -1559,7 +1559,7 @@ toshoboe_open (struct pci_dev *pci_dev, const struct pci_device_id *pdid)    self->io.fir_base = self->base;    self->io.fir_ext = OBOE_IO_EXTENT;    self->io.irq = pci_dev->irq; -  self->io.irqflags = IRQF_SHARED | IRQF_DISABLED; +  self->io.irqflags = IRQF_SHARED;    self->speed = self->io.speed = 9600;    self->async = 0; @@ -1607,7 +1607,6 @@ toshoboe_open (struct pci_dev *pci_dev, const struct pci_device_id *pdid)    self->ringbuf = kmalloc(OBOE_RING_LEN << 1, GFP_KERNEL);    if (!self->ringbuf)      { -      printk (KERN_ERR DRIVER_NAME ": can't allocate DMA buffers\n");        err = -ENOMEM;        goto freeregion;      } @@ -1646,7 +1645,6 @@ toshoboe_open (struct pci_dev *pci_dev, const struct pci_device_id *pdid)    if (!ok)      { -      printk (KERN_ERR DRIVER_NAME ": can't allocate rx/tx buffers\n");        err = -ENOMEM;        goto freebufs;      } @@ -1698,7 +1696,7 @@ freeself:  static int  toshoboe_gotosleep (struct pci_dev *pci_dev, pm_message_t crap)  { -  struct toshoboe_cb *self = (struct toshoboe_cb*)pci_get_drvdata(pci_dev); +  struct toshoboe_cb *self = pci_get_drvdata(pci_dev);    unsigned long flags;    int i = 10; @@ -1712,7 +1710,7 @@ toshoboe_gotosleep (struct pci_dev *pci_dev, pm_message_t crap)  /* Flush all packets */    while ((i--) && (self->txpending)) -    udelay (10000); +    msleep(10);    spin_lock_irqsave(&self->spinlock, flags); @@ -1727,7 +1725,7 @@ toshoboe_gotosleep (struct pci_dev *pci_dev, pm_message_t crap)  static int  toshoboe_wakeup (struct pci_dev *pci_dev)  { -  struct toshoboe_cb *self = (struct toshoboe_cb*)pci_get_drvdata(pci_dev); +  struct toshoboe_cb *self = pci_get_drvdata(pci_dev);    unsigned long flags;    IRDA_DEBUG (4, "%s()\n", __func__);  | 
