diff options
| author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-03 18:17:47 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-03 18:17:47 -0800 |
| commit | 89a2fa5f2139be35e214bcf86a8291d6a1da75f2 (patch) | |
| tree | 850ea412b013360bcace751db91cac6fb0067535 /drivers/parisc/ccio-dma.c | |
| parent | 27266a18dc56611e2f2ec4e8aced0fe221e9b4b8 (diff) | |
| parent | 68ee3eb8295c9c164071fcbd367c419121bd55f8 (diff) | |
Merge master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6
Diffstat (limited to 'drivers/parisc/ccio-dma.c')
| -rw-r--r-- | drivers/parisc/ccio-dma.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c index 9e0229f7e25f..f46e8438e0d2 100644 --- a/drivers/parisc/ccio-dma.c +++ b/drivers/parisc/ccio-dma.c @@ -1423,7 +1423,7 @@ static void __init ccio_init_resources(struct ioc *ioc) struct resource *res = ioc->mmio_region; char *name = kmalloc(14, GFP_KERNEL); - sprintf(name, "GSC Bus [%d/]", ioc->hw_path); + snprintf(name, 14, "GSC Bus [%d/]", ioc->hw_path); ccio_init_resource(res, name, &ioc->ioc_regs->io_io_low); ccio_init_resource(res + 1, name, &ioc->ioc_regs->io_io_low_hv); @@ -1557,12 +1557,11 @@ static int ccio_probe(struct parisc_device *dev) int i; struct ioc *ioc, **ioc_p = &ioc_list; - ioc = kmalloc(sizeof(struct ioc), GFP_KERNEL); + ioc = kzalloc(sizeof(struct ioc), GFP_KERNEL); if (ioc == NULL) { printk(KERN_ERR MODULE_NAME ": memory allocation failure\n"); return 1; } - memset(ioc, 0, sizeof(struct ioc)); ioc->name = dev->id.hversion == U2_IOA_RUNWAY ? "U2" : "UTurn"; @@ -1578,7 +1577,7 @@ static int ccio_probe(struct parisc_device *dev) ccio_ioc_init(ioc); ccio_init_resources(ioc); hppa_dma_ops = &ccio_ops; - dev->dev.platform_data = kmalloc(sizeof(struct pci_hba_data), GFP_KERNEL); + dev->dev.platform_data = kzalloc(sizeof(struct pci_hba_data), GFP_KERNEL); /* if this fails, no I/O cards will work, so may as well bug */ BUG_ON(dev->dev.platform_data == NULL); |
