summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid.c
diff options
context:
space:
mode:
authorwalter harms <wharms@bfs.de>2007-04-26 00:35:09 -0700
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-05-08 11:15:08 -0500
commit84a3c97b93ec5b4509637801a703693bb710cd4c (patch)
tree53208e3356a9364613c551ad91b54cf9eca7f23f /drivers/scsi/megaraid.c
parent39580f2c15485ee7f40923af731b3052f70cb890 (diff)
[SCSI] megaraid: fix warnings when CONFIG_PROC_FS=n
drivers/scsi/megaraid.c: In function 'megaraid_probe_one': drivers/scsi/megaraid.c:4893: warning: implicit declaration of function 'mega_create_proc_entry' drivers/scsi/megaraid.c: In function 'megaraid_remove_one': drivers/scsi/megaraid.c:4968: warning: unused variable 'buf' Fix by adding #defines Signed-off-by: walter harms <wharms@bfs.de> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/megaraid.c')
-rw-r--r--drivers/scsi/megaraid.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
index 7fc6e06ea7e..65bc130430e 100644
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -3177,7 +3177,10 @@ proc_rdrv(adapter_t *adapter, char *page, int start, int end )
return len;
}
-
+#else
+static inline void mega_create_proc_entry(int index, struct proc_dir_entry *parent)
+{
+}
#endif
@@ -4342,7 +4345,7 @@ mega_support_cluster(adapter_t *adapter)
return 0;
}
-
+#ifdef CONFIG_PROC_FS
/**
* mega_adapinq()
* @adapter - pointer to our soft state
@@ -4447,7 +4450,7 @@ mega_internal_dev_inquiry(adapter_t *adapter, u8 ch, u8 tgt,
return rval;
}
-
+#endif
/**
* mega_internal_command()
@@ -4965,7 +4968,6 @@ megaraid_remove_one(struct pci_dev *pdev)
{
struct Scsi_Host *host = pci_get_drvdata(pdev);
adapter_t *adapter = (adapter_t *)host->hostdata;
- char buf[12] = { 0 };
scsi_remove_host(host);
@@ -5011,8 +5013,11 @@ megaraid_remove_one(struct pci_dev *pdev)
remove_proc_entry("raiddrives-30-39",
adapter->controller_proc_dir_entry);
#endif
- sprintf(buf, "hba%d", adapter->host->host_no);
- remove_proc_entry(buf, mega_proc_dir_entry);
+ {
+ char buf[12] = { 0 };
+ sprintf(buf, "hba%d", adapter->host->host_no);
+ remove_proc_entry(buf, mega_proc_dir_entry);
+ }
}
#endif