aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parisc/ccio-dma.c
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-04-29 04:02:32 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 11:06:22 -0400
commit0fd689468231cb5eee9cc5d6331081b77c7a7a76 (patch)
treea6c755e5d5e62e03db61bdbb82ea5a5cac22bb2d /drivers/parisc/ccio-dma.c
parentc33fff0afbef4f0467c99e3f47ee7e98ae78c77e (diff)
parisc: use non-racy method for proc entries creation
Use proc_create() to make sure that ->proc_fops be setup before gluing PDE to main tree. Signed-off-by: Denis V. Lunev <den@openvz.org> Cc: Kyle McMartin <kyle@parisc-linux.org> Cc: Matthew Wilcox <matthew@wil.cx> Cc: Grant Grundler <grundler@parisc-linux.org> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/parisc/ccio-dma.c')
-rw-r--r--drivers/parisc/ccio-dma.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c
index 62db3c3fe4dc..07d2a8d4498f 100644
--- a/drivers/parisc/ccio-dma.c
+++ b/drivers/parisc/ccio-dma.c
@@ -1551,8 +1551,7 @@ static int __init ccio_probe(struct parisc_device *dev)
1551{ 1551{
1552 int i; 1552 int i;
1553 struct ioc *ioc, **ioc_p = &ioc_list; 1553 struct ioc *ioc, **ioc_p = &ioc_list;
1554 struct proc_dir_entry *info_entry, *bitmap_entry; 1554
1555
1556 ioc = kzalloc(sizeof(struct ioc), GFP_KERNEL); 1555 ioc = kzalloc(sizeof(struct ioc), GFP_KERNEL);
1557 if (ioc == NULL) { 1556 if (ioc == NULL) {
1558 printk(KERN_ERR MODULE_NAME ": memory allocation failure\n"); 1557 printk(KERN_ERR MODULE_NAME ": memory allocation failure\n");
@@ -1580,13 +1579,10 @@ static int __init ccio_probe(struct parisc_device *dev)
1580 HBA_DATA(dev->dev.platform_data)->iommu = ioc; 1579 HBA_DATA(dev->dev.platform_data)->iommu = ioc;
1581 1580
1582 if (ioc_count == 0) { 1581 if (ioc_count == 0) {
1583 info_entry = create_proc_entry(MODULE_NAME, 0, proc_runway_root); 1582 proc_create(MODULE_NAME, 0, proc_runway_root,
1584 if (info_entry) 1583 &ccio_proc_info_fops);
1585 info_entry->proc_fops = &ccio_proc_info_fops; 1584 proc_create(MODULE_NAME"-bitmap", 0, proc_runway_root,
1586 1585 &ccio_proc_bitmap_fops);
1587 bitmap_entry = create_proc_entry(MODULE_NAME"-bitmap", 0, proc_runway_root);
1588 if (bitmap_entry)
1589 bitmap_entry->proc_fops = &ccio_proc_bitmap_fops;
1590 } 1586 }
1591 1587
1592 ioc_count++; 1588 ioc_count++;