aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parisc/ccio-dma.c
diff options
context:
space:
mode:
authorHelge Deller <deller@parisc-linux.org>2006-01-17 14:40:40 -0500
committerKyle McMartin <kyle@duet.int.mcmartin.ca>2006-01-22 20:26:31 -0500
commitcb6fc18e9ca615f03d18e60c49855b434ca2e51e (patch)
treec35af13054f8eeb7a24c928edf55fdc69c912562 /drivers/parisc/ccio-dma.c
parenta1c744439591b1d4350f0926615d501e7cfbb708 (diff)
[PARISC] Use kzalloc and other janitor-style cleanups
Helge, o Convert a bunch of kmalloc/memset uses to kzalloc. o pci.c: Add some __read_mostly annotations. o pci.c: Move constant pci_post_reset_delay to asm/pci.h o grfioctl.h: Add A4450A to comment of CRT_ID_VISUALIZE_EG. o Add some consts to perf.c/perf_images.h Matthew, o sticore.c: Add some consts to suppress compile warnings. Signed-off-by: Helge Deller <deller@parisc-linux.org> Signed-off-by: Matthew Wilcox <willy@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'drivers/parisc/ccio-dma.c')
-rw-r--r--drivers/parisc/ccio-dma.c7
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)
1423 struct resource *res = ioc->mmio_region; 1423 struct resource *res = ioc->mmio_region;
1424 char *name = kmalloc(14, GFP_KERNEL); 1424 char *name = kmalloc(14, GFP_KERNEL);
1425 1425
1426 sprintf(name, "GSC Bus [%d/]", ioc->hw_path); 1426 snprintf(name, 14, "GSC Bus [%d/]", ioc->hw_path);
1427 1427
1428 ccio_init_resource(res, name, &ioc->ioc_regs->io_io_low); 1428 ccio_init_resource(res, name, &ioc->ioc_regs->io_io_low);
1429 ccio_init_resource(res + 1, name, &ioc->ioc_regs->io_io_low_hv); 1429 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)
1557 int i; 1557 int i;
1558 struct ioc *ioc, **ioc_p = &ioc_list; 1558 struct ioc *ioc, **ioc_p = &ioc_list;
1559 1559
1560 ioc = kmalloc(sizeof(struct ioc), GFP_KERNEL); 1560 ioc = kzalloc(sizeof(struct ioc), GFP_KERNEL);
1561 if (ioc == NULL) { 1561 if (ioc == NULL) {
1562 printk(KERN_ERR MODULE_NAME ": memory allocation failure\n"); 1562 printk(KERN_ERR MODULE_NAME ": memory allocation failure\n");
1563 return 1; 1563 return 1;
1564 } 1564 }
1565 memset(ioc, 0, sizeof(struct ioc));
1566 1565
1567 ioc->name = dev->id.hversion == U2_IOA_RUNWAY ? "U2" : "UTurn"; 1566 ioc->name = dev->id.hversion == U2_IOA_RUNWAY ? "U2" : "UTurn";
1568 1567
@@ -1578,7 +1577,7 @@ static int ccio_probe(struct parisc_device *dev)
1578 ccio_ioc_init(ioc); 1577 ccio_ioc_init(ioc);
1579 ccio_init_resources(ioc); 1578 ccio_init_resources(ioc);
1580 hppa_dma_ops = &ccio_ops; 1579 hppa_dma_ops = &ccio_ops;
1581 dev->dev.platform_data = kmalloc(sizeof(struct pci_hba_data), GFP_KERNEL); 1580 dev->dev.platform_data = kzalloc(sizeof(struct pci_hba_data), GFP_KERNEL);
1582 1581
1583 /* if this fails, no I/O cards will work, so may as well bug */ 1582 /* if this fails, no I/O cards will work, so may as well bug */
1584 BUG_ON(dev->dev.platform_data == NULL); 1583 BUG_ON(dev->dev.platform_data == NULL);