[2.6 patch] esp_scsi.c: remove __dev{init,exit}

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Adrian Bunk
Date: Thursday, October 11, 2007 - 8:35 am

On Thu, Oct 11, 2007 at 08:30:38AM -0500, James Bottomley wrote:

You can't make it conditional on that since a built-in esp_scsi could 
have modular users.

scsi_esp_register() is also buggy since it's impossible that the 
EXPORT_SYMBOL(scsi_esp_register) works in the CONFIG_HOTPLUG=n case when 
it's __devinit - it will always Oops.

Having anything exported __{,dev}{init,exit} is always very likely to be 
buggy.

Patch below.


cu
Adrian


<--  snip  -->


Since scsi_esp_{,un}register() are EXPORT_SYMBOL'ed, these functions
(and the functions they use) can't be __dev{init,exit}.

Based on a bug report by Rob Landley.

Signed-off-by: Adrian Bunk <bunk@kernel.org>

---

 drivers/scsi/esp_scsi.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

--- linux-2.6.23/drivers/scsi/esp_scsi.c.old	2007-10-11 17:29:50.000000000 +0200
+++ linux-2.6.23/drivers/scsi/esp_scsi.c	2007-10-11 17:31:25.000000000 +0200
@@ -2138,7 +2138,7 @@
 }
 EXPORT_SYMBOL(scsi_esp_intr);
 
-static void __devinit esp_get_revision(struct esp *esp)
+static void esp_get_revision(struct esp *esp)
 {
 	u8 val;
 
@@ -2187,7 +2187,7 @@
 	}
 }
 
-static void __devinit esp_init_swstate(struct esp *esp)
+static void esp_init_swstate(struct esp *esp)
 {
 	int i;
 
@@ -2233,7 +2233,7 @@
 	esp_read8(ESP_INTRPT);
 }
 
-static void __devinit esp_set_clock_params(struct esp *esp)
+static void esp_set_clock_params(struct esp *esp)
 {
 	int fmhz;
 	u8 ccf;
@@ -2306,7 +2306,7 @@
 
 static struct scsi_transport_template *esp_transport_template;
 
-int __devinit scsi_esp_register(struct esp *esp, struct device *dev)
+int scsi_esp_register(struct esp *esp, struct device *dev)
 {
 	static int instance;
 	int err;
@@ -2346,7 +2346,7 @@
 }
 EXPORT_SYMBOL(scsi_esp_register);
 
-void __devexit scsi_esp_unregister(struct esp *esp)
+void scsi_esp_unregister(struct esp *esp)
 {
 	scsi_remove_host(esp->host);
 }

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Scsi on sparc build break in 2.6.23., Rob Landley, (Thu Oct 11, 3:52 am)
Re: Scsi on sparc build break in 2.6.23., Adrian Bunk, (Thu Oct 11, 4:05 am)
Re: Scsi on sparc build break in 2.6.23., Rob Landley, (Thu Oct 11, 6:17 am)
Re: Scsi on sparc build break in 2.6.23., James Bottomley, (Thu Oct 11, 6:30 am)
Re: Scsi on sparc build break in 2.6.23., Adrian Bunk, (Thu Oct 11, 8:21 am)
[2.6 patch] esp_scsi.c: remove __dev{init,exit}, Adrian Bunk, (Thu Oct 11, 8:35 am)
Re: [2.6 patch] esp_scsi.c: remove __dev{init,exit}, David Miller, (Thu Oct 11, 2:49 pm)
Re: [2.6 patch] esp_scsi.c: remove __dev{init,exit}, Rob Landley, (Thu Oct 11, 3:47 pm)
Re: [2.6 patch] esp_scsi.c: remove __dev{init,exit}, Rob Landley, (Thu Oct 18, 1:18 am)