diff options
author | David Howells <dhowells@redhat.com> | 2013-04-11 21:48:30 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-05-01 17:29:41 -0400 |
commit | 270b5ac2151707c25d3327722c5badfbd95945bc (patch) | |
tree | 27e07d1c8f531f8a817071bdb7f8c2ae5282886c /drivers/scsi/megaraid.c | |
parent | 34db8aaf0f95ffac407d39da22972b38da631db4 (diff) |
proc: Add proc_mkdir_data()
Add proc_mkdir_data() to allow procfs directories to be created that are
annotated at the time of creation with private data rather than doing this
post-creation. This means no access is then required to the proc_dir_entry
struct to set this.
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
cc: Neela Syam Kolli <megaraidlinux@lsi.com>
cc: Jerry Chuang <jerry-chuang@realtek.com>
cc: linux-scsi@vger.kernel.org
cc: devel@driverdev.osuosl.org
cc: linux-wireless@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/scsi/megaraid.c')
-rw-r--r-- | drivers/scsi/megaraid.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index a1c90bd34e78..ef3384d39e11 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c | |||
@@ -2818,12 +2818,12 @@ mega_create_proc_entry(int index, struct proc_dir_entry *parent) | |||
2818 | 2818 | ||
2819 | sprintf(string, "hba%d", adapter->host->host_no); | 2819 | sprintf(string, "hba%d", adapter->host->host_no); |
2820 | 2820 | ||
2821 | dir = adapter->controller_proc_dir_entry = proc_mkdir(string, parent); | 2821 | dir = adapter->controller_proc_dir_entry = |
2822 | proc_mkdir_data(string, 0, parent, adapter); | ||
2822 | if(!dir) { | 2823 | if(!dir) { |
2823 | printk(KERN_WARNING "\nmegaraid: proc_mkdir failed\n"); | 2824 | printk(KERN_WARNING "\nmegaraid: proc_mkdir failed\n"); |
2824 | return; | 2825 | return; |
2825 | } | 2826 | } |
2826 | dir->data = adapter; | ||
2827 | 2827 | ||
2828 | for (f = mega_proc_files; f->name; f++) { | 2828 | for (f = mega_proc_files; f->name; f++) { |
2829 | de = proc_create_data(f->name, S_IRUSR, dir, &mega_proc_fops, | 2829 | de = proc_create_data(f->name, S_IRUSR, dir, &mega_proc_fops, |