aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/atm/zatm.c
diff options
context:
space:
mode:
authorOm Narasimhan <om.turyx@gmail.com>2006-10-03 19:27:18 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-10-04 03:31:04 -0400
commit0c1cca1d8e0d58775dad43374f925e6cddf1bebc (patch)
tree72b5aee63958025c7e3aa03f76ae40a004b58750 /drivers/atm/zatm.c
parent617dbeaa3f2987acc83c1149409685005e9dd740 (diff)
[ATM]: kmalloc to kzalloc patches for drivers/atm
Signed-off-by: Om Narasimhan <om.turyx@gmail.com> Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/atm/zatm.c')
-rw-r--r--drivers/atm/zatm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/atm/zatm.c b/drivers/atm/zatm.c
index 2c65e82f0d6b..c491ec455cac 100644
--- a/drivers/atm/zatm.c
+++ b/drivers/atm/zatm.c
@@ -603,9 +603,8 @@ static int start_rx(struct atm_dev *dev)
603DPRINTK("start_rx\n"); 603DPRINTK("start_rx\n");
604 zatm_dev = ZATM_DEV(dev); 604 zatm_dev = ZATM_DEV(dev);
605 size = sizeof(struct atm_vcc *)*zatm_dev->chans; 605 size = sizeof(struct atm_vcc *)*zatm_dev->chans;
606 zatm_dev->rx_map = (struct atm_vcc **) kmalloc(size,GFP_KERNEL); 606 zatm_dev->rx_map = kzalloc(size,GFP_KERNEL);
607 if (!zatm_dev->rx_map) return -ENOMEM; 607 if (!zatm_dev->rx_map) return -ENOMEM;
608 memset(zatm_dev->rx_map,0,size);
609 /* set VPI/VCI split (use all VCIs and give what's left to VPIs) */ 608 /* set VPI/VCI split (use all VCIs and give what's left to VPIs) */
610 zpokel(zatm_dev,(1 << dev->ci_range.vci_bits)-1,uPD98401_VRR); 609 zpokel(zatm_dev,(1 << dev->ci_range.vci_bits)-1,uPD98401_VRR);
611 /* prepare free buffer pools */ 610 /* prepare free buffer pools */
@@ -951,9 +950,8 @@ static int open_tx_first(struct atm_vcc *vcc)
951 skb_queue_head_init(&zatm_vcc->tx_queue); 950 skb_queue_head_init(&zatm_vcc->tx_queue);
952 init_waitqueue_head(&zatm_vcc->tx_wait); 951 init_waitqueue_head(&zatm_vcc->tx_wait);
953 /* initialize ring */ 952 /* initialize ring */
954 zatm_vcc->ring = kmalloc(RING_SIZE,GFP_KERNEL); 953 zatm_vcc->ring = kzalloc(RING_SIZE,GFP_KERNEL);
955 if (!zatm_vcc->ring) return -ENOMEM; 954 if (!zatm_vcc->ring) return -ENOMEM;
956 memset(zatm_vcc->ring,0,RING_SIZE);
957 loop = zatm_vcc->ring+RING_ENTRIES*RING_WORDS; 955 loop = zatm_vcc->ring+RING_ENTRIES*RING_WORDS;
958 loop[0] = uPD98401_TXPD_V; 956 loop[0] = uPD98401_TXPD_V;
959 loop[1] = loop[2] = 0; 957 loop[1] = loop[2] = 0;