aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cdrom
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-04-29 04:02:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 11:06:22 -0400
commitc7705f3449c7edd5c1744871097f93977227afc4 (patch)
treed2f121a4b1ae3ae458db76ec0210ea2172c31e5a /drivers/cdrom
parent1b50221738108c438d5f25c7a043fb89e9e27044 (diff)
drivers: use non-racy method for proc entries creation (2)
Use proc_create()/proc_create_data() to make sure that ->proc_fops and ->data be setup before gluing PDE to main tree. Signed-off-by: Denis V. Lunev <den@openvz.org> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Peter Osterlund <petero2@telia.com> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Neil Brown <neilb@suse.de> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/cdrom')
-rw-r--r--drivers/cdrom/viocd.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c
index b74b6c2768a8..5245a4a0ba74 100644
--- a/drivers/cdrom/viocd.c
+++ b/drivers/cdrom/viocd.c
@@ -144,6 +144,7 @@ static int proc_viocd_open(struct inode *inode, struct file *file)
144} 144}
145 145
146static const struct file_operations proc_viocd_operations = { 146static const struct file_operations proc_viocd_operations = {
147 .owner = THIS_MODULE,
147 .open = proc_viocd_open, 148 .open = proc_viocd_open,
148 .read = seq_read, 149 .read = seq_read,
149 .llseek = seq_lseek, 150 .llseek = seq_lseek,
@@ -679,7 +680,6 @@ static struct vio_driver viocd_driver = {
679 680
680static int __init viocd_init(void) 681static int __init viocd_init(void)
681{ 682{
682 struct proc_dir_entry *e;
683 int ret = 0; 683 int ret = 0;
684 684
685 if (!firmware_has_feature(FW_FEATURE_ISERIES)) 685 if (!firmware_has_feature(FW_FEATURE_ISERIES))
@@ -719,12 +719,8 @@ static int __init viocd_init(void)
719 if (ret) 719 if (ret)
720 goto out_free_info; 720 goto out_free_info;
721 721
722 e = create_proc_entry("iSeries/viocd", S_IFREG|S_IRUGO, NULL); 722 proc_create("iSeries/viocd", S_IFREG|S_IRUGO, NULL,
723 if (e) { 723 &proc_viocd_operations);
724 e->owner = THIS_MODULE;
725 e->proc_fops = &proc_viocd_operations;
726 }
727
728 return 0; 724 return 0;
729 725
730out_free_info: 726out_free_info: