diff options
Diffstat (limited to 'drivers/atm/zatm.c')
-rw-r--r-- | drivers/atm/zatm.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/atm/zatm.c b/drivers/atm/zatm.c index 2c65e82f0d6..7df0f373188 100644 --- a/drivers/atm/zatm.c +++ b/drivers/atm/zatm.c @@ -603,9 +603,8 @@ static int start_rx(struct atm_dev *dev) DPRINTK("start_rx\n"); zatm_dev = ZATM_DEV(dev); size = sizeof(struct atm_vcc *)*zatm_dev->chans; - zatm_dev->rx_map = (struct atm_vcc **) kmalloc(size,GFP_KERNEL); + zatm_dev->rx_map = kzalloc(size,GFP_KERNEL); if (!zatm_dev->rx_map) return -ENOMEM; - memset(zatm_dev->rx_map,0,size); /* set VPI/VCI split (use all VCIs and give what's left to VPIs) */ zpokel(zatm_dev,(1 << dev->ci_range.vci_bits)-1,uPD98401_VRR); /* prepare free buffer pools */ @@ -801,6 +800,7 @@ static int alloc_shaper(struct atm_dev *dev,int *pcr,int min,int max,int ubr) i = m = 1; zatm_dev->ubr_ref_cnt++; zatm_dev->ubr = shaper; + *pcr = 0; } else { if (min) { @@ -951,9 +951,8 @@ static int open_tx_first(struct atm_vcc *vcc) skb_queue_head_init(&zatm_vcc->tx_queue); init_waitqueue_head(&zatm_vcc->tx_wait); /* initialize ring */ - zatm_vcc->ring = kmalloc(RING_SIZE,GFP_KERNEL); + zatm_vcc->ring = kzalloc(RING_SIZE,GFP_KERNEL); if (!zatm_vcc->ring) return -ENOMEM; - memset(zatm_vcc->ring,0,RING_SIZE); loop = zatm_vcc->ring+RING_ENTRIES*RING_WORDS; loop[0] = uPD98401_TXPD_V; loop[1] = loop[2] = 0; @@ -1013,7 +1012,7 @@ static int start_tx(struct atm_dev *dev) /*------------------------------- interrupts --------------------------------*/ -static irqreturn_t zatm_int(int irq,void *dev_id,struct pt_regs *regs) +static irqreturn_t zatm_int(int irq,void *dev_id) { struct atm_dev *dev; struct zatm_dev *zatm_dev; |