[ATM]: kmalloc to kzalloc patches for drivers/atm
[deliverable/linux.git] / drivers / atm / he.c
index ffcb9fd31c38fbdd7a1efbb2b52eb6f7e5d2c116..b22a9142b240677530dc06a6781e5590b17ecafc 100644 (file)
@@ -383,14 +383,12 @@ he_init_one(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent)
        }
        pci_set_drvdata(pci_dev, atm_dev);
 
-       he_dev = (struct he_dev *) kmalloc(sizeof(struct he_dev),
+       he_dev = kzalloc(sizeof(struct he_dev),
                                                        GFP_KERNEL);
        if (!he_dev) {
                err = -ENOMEM;
                goto init_one_failure;
        }
-       memset(he_dev, 0, sizeof(struct he_dev));
-
        he_dev->pci_dev = pci_dev;
        he_dev->atm_dev = atm_dev;
        he_dev->atm_dev->dev_data = he_dev;
@@ -454,7 +452,7 @@ rate_to_atmf(unsigned rate)         /* cps to atm forum format */
        return (NONZERO | (exp << 9) | (rate & 0x1ff));
 }
 
-static void __init
+static void __devinit
 he_init_rx_lbfp0(struct he_dev *he_dev)
 {
        unsigned i, lbm_offset, lbufd_index, lbuf_addr, lbuf_count;
@@ -485,7 +483,7 @@ he_init_rx_lbfp0(struct he_dev *he_dev)
        he_writel(he_dev, he_dev->r0_numbuffs, RLBF0_C);
 }
 
-static void __init
+static void __devinit
 he_init_rx_lbfp1(struct he_dev *he_dev)
 {
        unsigned i, lbm_offset, lbufd_index, lbuf_addr, lbuf_count;
@@ -516,7 +514,7 @@ he_init_rx_lbfp1(struct he_dev *he_dev)
        he_writel(he_dev, he_dev->r1_numbuffs, RLBF1_C);
 }
 
-static void __init
+static void __devinit
 he_init_tx_lbfp(struct he_dev *he_dev)
 {
        unsigned i, lbm_offset, lbufd_index, lbuf_addr, lbuf_count;
@@ -546,7 +544,7 @@ he_init_tx_lbfp(struct he_dev *he_dev)
        he_writel(he_dev, lbufd_index - 1, TLBF_T);
 }
 
-static int __init
+static int __devinit
 he_init_tpdrq(struct he_dev *he_dev)
 {
        he_dev->tpdrq_base = pci_alloc_consistent(he_dev->pci_dev,
@@ -568,7 +566,7 @@ he_init_tpdrq(struct he_dev *he_dev)
        return 0;
 }
 
-static void __init
+static void __devinit
 he_init_cs_block(struct he_dev *he_dev)
 {
        unsigned clock, rate, delta;
@@ -664,7 +662,7 @@ he_init_cs_block(struct he_dev *he_dev)
 
 }
 
-static int __init
+static int __devinit
 he_init_cs_block_rcm(struct he_dev *he_dev)
 {
        unsigned (*rategrid)[16][16];
@@ -785,7 +783,7 @@ he_init_cs_block_rcm(struct he_dev *he_dev)
        return 0;
 }
 
-static int __init
+static int __devinit
 he_init_group(struct he_dev *he_dev, int group)
 {
        int i;
@@ -955,7 +953,7 @@ he_init_group(struct he_dev *he_dev, int group)
        return 0;
 }
 
-static int __init
+static int __devinit
 he_init_irq(struct he_dev *he_dev)
 {
        int i;
@@ -1912,7 +1910,7 @@ he_service_rbrq(struct he_dev *he_dev, int group)
                                skb->tail = skb->data + skb->len;
 #ifdef USE_CHECKSUM_HW
                                if (vcc->vpi == 0 && vcc->vci >= ATM_NOT_RSV_VCI) {
-                                       skb->ip_summed = CHECKSUM_HW;
+                                       skb->ip_summed = CHECKSUM_COMPLETE;
                                        skb->csum = TCP_CKSUM(skb->data,
                                                        he_vcc->pdu_len);
                                }
This page took 0.025352 seconds and 5 git commands to generate.