]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/wan/dscc4.c
LIB82596: correct data types for hardware addresses
[linux-2.6-omap-h63xx.git] / drivers / net / wan / dscc4.c
index af4d4155905bfc70e2aa9c72d84befcb9d624069..33dc713b53017071acfcac25f7e5e9146534a4da 100644 (file)
@@ -365,7 +365,7 @@ static int dscc4_init_ring(struct net_device *);
 static void dscc4_release_ring(struct dscc4_dev_priv *);
 static void dscc4_timer(unsigned long);
 static void dscc4_tx_timeout(struct net_device *);
-static irqreturn_t dscc4_irq(int irq, void *dev_id, struct pt_regs *ptregs);
+static irqreturn_t dscc4_irq(int irq, void *dev_id);
 static int dscc4_hdlc_attach(struct net_device *, unsigned short, unsigned short);
 static int dscc4_set_iface(struct dscc4_dev_priv *, struct net_device *);
 #ifdef DSCC4_POLLING
@@ -890,12 +890,11 @@ static int dscc4_found1(struct pci_dev *pdev, void __iomem *ioaddr)
        struct dscc4_dev_priv *root;
        int i, ret = -ENOMEM;
 
-       root = kmalloc(dev_per_card*sizeof(*root), GFP_KERNEL);
+       root = kcalloc(dev_per_card, sizeof(*root), GFP_KERNEL);
        if (!root) {
                printk(KERN_ERR "%s: can't allocate data\n", DRV_NAME);
                goto err_out;
        }
-       memset(root, 0, dev_per_card*sizeof(*root));
 
        for (i = 0; i < dev_per_card; i++) {
                root[i].dev = alloc_hdlcdev(root + i);
@@ -903,12 +902,11 @@ static int dscc4_found1(struct pci_dev *pdev, void __iomem *ioaddr)
                        goto err_free_dev;
        }
 
-       ppriv = kmalloc(sizeof(*ppriv), GFP_KERNEL);
+       ppriv = kzalloc(sizeof(*ppriv), GFP_KERNEL);
        if (!ppriv) {
                printk(KERN_ERR "%s: can't allocate private data\n", DRV_NAME);
                goto err_free_dev;
        }
-       memset(ppriv, 0, sizeof(struct dscc4_pci_priv));
 
        ppriv->root = root;
        spin_lock_init(&ppriv->lock);
@@ -927,7 +925,6 @@ static int dscc4_found1(struct pci_dev *pdev, void __iomem *ioaddr)
                d->do_ioctl = dscc4_ioctl;
                d->tx_timeout = dscc4_tx_timeout;
                d->watchdog_timeo = TX_TIMEOUT;
-               SET_MODULE_OWNER(d);
                SET_NETDEV_DEV(d, &pdev->dev);
 
                dpriv->dev_id = i;
@@ -1476,7 +1473,7 @@ static int dscc4_set_iface(struct dscc4_dev_priv *dpriv, struct net_device *dev)
        return ret;
 }
 
-static irqreturn_t dscc4_irq(int irq, void *token, struct pt_regs *ptregs)
+static irqreturn_t dscc4_irq(int irq, void *token)
 {
        struct dscc4_dev_priv *root = token;
        struct dscc4_pci_priv *priv;
@@ -1904,7 +1901,8 @@ static struct sk_buff *dscc4_init_dummy_skb(struct dscc4_dev_priv *dpriv)
                struct TxFD *tx_fd = dpriv->tx_fd + last;
 
                skb->len = DUMMY_SKB_SIZE;
-               memcpy(skb->data, version, strlen(version)%DUMMY_SKB_SIZE);
+               skb_copy_to_linear_data(skb, version,
+                                       strlen(version) % DUMMY_SKB_SIZE);
                tx_fd->state = FrameEnd | TO_STATE_TX(DUMMY_SKB_SIZE);
                tx_fd->data = pci_map_single(dpriv->pci_priv->pdev, skb->data,
                                             DUMMY_SKB_SIZE, PCI_DMA_TODEVICE);