Commit 518365c2 authored by Paul Wagland's avatar Paul Wagland Committed by James Bottomley

[PATCH] SCSI: megaraid /proc dir fix

I know that LSI are working on an updated driver for 2.6, but would
really like to see this bug fix placed in the main tree before then,
whenever then happens to be.

This patch fixes the problem of the /proc entries for this driver being
created in the wrong location.
parent ed3899b2
...@@ -5118,10 +5118,6 @@ static int __init megaraid_init(void) ...@@ -5118,10 +5118,6 @@ static int __init megaraid_init(void)
if (max_mbox_busy_wait > MBOX_BUSY_WAIT) if (max_mbox_busy_wait > MBOX_BUSY_WAIT)
max_mbox_busy_wait = MBOX_BUSY_WAIT; max_mbox_busy_wait = MBOX_BUSY_WAIT;
error = pci_module_init(&megaraid_pci_driver);
if (error)
return error;
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
mega_proc_dir_entry = proc_mkdir("megaraid", &proc_root); mega_proc_dir_entry = proc_mkdir("megaraid", &proc_root);
if (!mega_proc_dir_entry) { if (!mega_proc_dir_entry) {
...@@ -5129,6 +5125,13 @@ static int __init megaraid_init(void) ...@@ -5129,6 +5125,13 @@ static int __init megaraid_init(void)
"megaraid: failed to create megaraid root\n"); "megaraid: failed to create megaraid root\n");
} }
#endif #endif
error = pci_module_init(&megaraid_pci_driver);
if (error) {
#ifdef CONFIG_PROC_FS
remove_proc_entry("megaraid", &proc_root);
#endif
return error;
}
/* /*
* Register the driver as a character device, for applications * Register the driver as a character device, for applications
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment