Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
[sfrench/cifs-2.6.git] / drivers / net / dgrs.c
index fa4f09432975b5d17ee5797b419c6b43f3150567..df62c0232f369e431876a2da16b50fafbb2d7d43 100644 (file)
@@ -110,7 +110,6 @@ static char version[] __initdata =
  *     DGRS include files
  */
 typedef unsigned char uchar;
-typedef unsigned int bool;
 #define vol volatile
 
 #include "dgrs.h"
@@ -504,7 +503,6 @@ dgrs_rcv_frame(
                /* discarding the frame */
                goto out;
        }
-       skb->dev = devN;
        skb_reserve(skb, 2);    /* Align IP header */
 
 again:
@@ -743,7 +741,7 @@ static int dgrs_start_xmit(struct sk_buff *skb, struct net_device *devN)
                }
 
                amt = min_t(unsigned int, len, rbdp->size - count);
-               memcpy( (char *) S2H(rbdp->buf) + count, skb->data + i, amt);
+               skb_copy_from_linear_data_offset(skb, i, S2H(rbdp->buf) + count, amt);
                i += amt;
                count += amt;
                len -= amt;
@@ -874,7 +872,7 @@ static int dgrs_ioctl(struct net_device *devN, struct ifreq *ifr, int cmd)
                        privN->bcomm->bc_filter_port = ioc.port;
                        privN->bcomm->bc_filter_num = ioc.filter;
                        privN->bcomm->bc_filter_len = ioc.len;
-       
+
                        if (ioc.len)
                        {
                                if(copy_from_user(S2HN(privN->bcomm->bc_filter_area),
@@ -896,10 +894,10 @@ static int dgrs_ioctl(struct net_device *devN, struct ifreq *ifr, int cmd)
  *     dev, priv will always refer to the 0th device in Multi-NIC mode.
  */
 
-static irqreturn_t dgrs_intr(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t dgrs_intr(int irq, void *dev_id)
 {
-       struct net_device       *dev0 = (struct net_device *) dev_id;
-       DGRS_PRIV       *priv0 = (DGRS_PRIV *) dev0->priv;
+       struct net_device       *dev0 = dev_id;
+       DGRS_PRIV       *priv0 = dev0->priv;
        I596_CB         *cbp;
        int             cmd;
        int             i;
@@ -986,7 +984,7 @@ ack_intr:
 /*
  *     Download the board firmware
  */
-static int __init 
+static int __init
 dgrs_download(struct net_device *dev0)
 {
        DGRS_PRIV       *priv0 = (DGRS_PRIV *) dev0->priv;
@@ -1150,7 +1148,7 @@ dgrs_download(struct net_device *dev0)
 /*
  *     Probe (init) a board
  */
-static int __init 
+static int __init
 dgrs_probe1(struct net_device *dev)
 {
        DGRS_PRIV       *priv = (DGRS_PRIV *) dev->priv;
@@ -1190,7 +1188,7 @@ dgrs_probe1(struct net_device *dev)
         */
        if (priv->plxreg)
                OUTL(dev->base_addr + PLX_LCL2PCI_DOORBELL, 1);
-       
+
        rc = request_irq(dev->irq, &dgrs_intr, IRQF_SHARED, "RightSwitch", dev);
        if (rc)
                goto err_out;
@@ -1228,7 +1226,7 @@ err_out:
                return rc;
 }
 
-static int __init 
+static int __init
 dgrs_initclone(struct net_device *dev)
 {
        DGRS_PRIV       *priv = (DGRS_PRIV *) dev->priv;
@@ -1243,7 +1241,7 @@ dgrs_initclone(struct net_device *dev)
        return (0);
 }
 
-static struct net_device * __init 
+static struct net_device * __init
 dgrs_found_device(
        int             io,
        ulong           mem,
@@ -1276,9 +1274,9 @@ dgrs_found_device(
 
        SET_MODULE_OWNER(dev);
        SET_NETDEV_DEV(dev, pdev);
-       
+
        ret = dgrs_probe1(dev);
-       if (ret) 
+       if (ret)
                goto err1;
 
        ret = register_netdev(dev);
@@ -1301,7 +1299,7 @@ dgrs_found_device(
                        /* Allocate new dev and priv structures */
                devN = alloc_etherdev(sizeof(DGRS_PRIV));
                ret = -ENOMEM;
-               if (!devN) 
+               if (!devN)
                        goto fail;
 
                /* Don't copy the network device structure! */
@@ -1335,7 +1333,7 @@ dgrs_found_device(
        }
        return dev;
 
- fail: 
+ fail:
        while (i >= 0) {
                struct net_device *d = priv->devtbl[i--];
                unregister_netdev(d);
@@ -1480,7 +1478,7 @@ static int __init dgrs_eisa_probe (struct device *gendev)
                return -EBUSY;
        }
 
-       if ( ! (inb(io+ES4H_EC) & ES4H_EC_ENABLE) ) 
+       if ( ! (inb(io+ES4H_EC) & ES4H_EC_ENABLE) )
                goto err_out;
 
        mem = (inb(io+ES4H_AS_31_24) << 24)
@@ -1504,11 +1502,11 @@ static int __init dgrs_eisa_probe (struct device *gendev)
 static int __devexit dgrs_eisa_remove(struct device *gendev)
 {
        struct net_device *dev = gendev->driver_data;
-       
+
        dgrs_remove(dev);
 
        release_region(dev->base_addr, 256);
-               
+
        free_netdev(dev);
        return 0;
 }