X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=sound%2Foss%2Fswarm_cs4297a.c;h=a8057f25955319d089badd9515553b62497f82a1;hb=8755e568250ecd3149ecd3495d8070f3a5384f73;hp=9f7e5f59ac82b3560d1717b8840aa0e2d840b789;hpb=463020ce428e2f00d4f33a383d6f39c7453a6854;p=karo-tx-linux.git diff --git a/sound/oss/swarm_cs4297a.c b/sound/oss/swarm_cs4297a.c index 9f7e5f59ac82..a8057f259553 100644 --- a/sound/oss/swarm_cs4297a.c +++ b/sound/oss/swarm_cs4297a.c @@ -75,7 +75,6 @@ #include #include #include -#include #include #include @@ -616,25 +615,23 @@ static int init_serdma(serdma_t *dma) /* Descriptors */ dma->ringsz = DMA_DESCR; - dma->descrtab = kmalloc(dma->ringsz * sizeof(serdma_descr_t), GFP_KERNEL); + dma->descrtab = kzalloc(dma->ringsz * sizeof(serdma_descr_t), GFP_KERNEL); if (!dma->descrtab) { - printk(KERN_ERR "cs4297a: kmalloc descrtab failed\n"); + printk(KERN_ERR "cs4297a: kzalloc descrtab failed\n"); return -1; } - memset(dma->descrtab, 0, dma->ringsz * sizeof(serdma_descr_t)); dma->descrtab_end = dma->descrtab + dma->ringsz; /* XXX bloddy mess, use proper DMA API here ... */ dma->descrtab_phys = CPHYSADDR((long)dma->descrtab); dma->descr_add = dma->descr_rem = dma->descrtab; /* Frame buffer area */ - dma->dma_buf = kmalloc(DMA_BUF_SIZE, GFP_KERNEL); + dma->dma_buf = kzalloc(DMA_BUF_SIZE, GFP_KERNEL); if (!dma->dma_buf) { - printk(KERN_ERR "cs4297a: kmalloc dma_buf failed\n"); + printk(KERN_ERR "cs4297a: kzalloc dma_buf failed\n"); kfree(dma->descrtab); return -1; } - memset(dma->dma_buf, 0, DMA_BUF_SIZE); dma->dma_buf_phys = CPHYSADDR((long)dma->dma_buf); /* Samples buffer area */ @@ -2619,12 +2616,11 @@ static int __init cs4297a_init(void) udelay(100); #endif - if (!(s = kmalloc(sizeof(struct cs4297a_state), GFP_KERNEL))) { + if (!(s = kzalloc(sizeof(struct cs4297a_state), GFP_KERNEL))) { CS_DBGOUT(CS_ERROR, 1, printk(KERN_ERR "cs4297a: probe() no memory for state struct.\n")); return -1; } - memset(s, 0, sizeof(struct cs4297a_state)); s->magic = CS4297a_MAGIC; init_waitqueue_head(&s->dma_adc.wait); init_waitqueue_head(&s->dma_dac.wait);