aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parisc/sba_iommu.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/sba_iommu.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/sba_iommu.c')
-rw-r--r--drivers/parisc/sba_iommu.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c
index 8c4d2c13d5f2..afc849bd3f58 100644
--- a/drivers/parisc/sba_iommu.c
+++ b/drivers/parisc/sba_iommu.c
@@ -1895,7 +1895,9 @@ sba_driver_callback(struct parisc_device *dev)
1895 int i; 1895 int i;
1896 char *version; 1896 char *version;
1897 void __iomem *sba_addr = ioremap_nocache(dev->hpa.start, SBA_FUNC_SIZE); 1897 void __iomem *sba_addr = ioremap_nocache(dev->hpa.start, SBA_FUNC_SIZE);
1898 struct proc_dir_entry *info_entry, *bitmap_entry, *root; 1898#ifdef CONFIG_PROC_FS
1899 struct proc_dir_entry *root;
1900#endif
1899 1901
1900 sba_dump_ranges(sba_addr); 1902 sba_dump_ranges(sba_addr);
1901 1903
@@ -1973,14 +1975,8 @@ sba_driver_callback(struct parisc_device *dev)
1973 break; 1975 break;
1974 } 1976 }
1975 1977
1976 info_entry = create_proc_entry("sba_iommu", 0, root); 1978 proc_create("sba_iommu", 0, root, &sba_proc_fops);
1977 bitmap_entry = create_proc_entry("sba_iommu-bitmap", 0, root); 1979 proc_create("sba_iommu-bitmap", 0, root, &sba_proc_bitmap_fops);
1978
1979 if (info_entry)
1980 info_entry->proc_fops = &sba_proc_fops;
1981
1982 if (bitmap_entry)
1983 bitmap_entry->proc_fops = &sba_proc_bitmap_fops;
1984#endif 1980#endif
1985 1981
1986 parisc_vmerge_boundary = IOVP_SIZE; 1982 parisc_vmerge_boundary = IOVP_SIZE;