diff mbox

mtd: sst25l: fix section markings

Message ID 1304950078-27141-1-git-send-email-vapier@gentoo.org
State Accepted, archived
Commit 61cc8276fa776ced06b0e5b67b57e12c4997d388
Headers show

Commit Message

Mike Frysinger May 9, 2011, 2:07 p.m. UTC
The previous section mismatch fix for this driver wasn't entirely correct.
The sst25l_flash_info array is now used in the devinit probe func, but is
marked as initdata, so building results in the warning:

WARNING: drivers/mtd/devices/sst25l.o(.devinit.text): Section mismatch
	in reference from the function sst25l_probe()
	to the variable .init.data:sst25l_flash_info

Further, the remove func should be devexit rather than exit to match the
probe func.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 drivers/mtd/devices/sst25l.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Comments

Artem Bityutskiy May 12, 2011, 12:28 p.m. UTC | #1
On Mon, 2011-05-09 at 10:07 -0400, Mike Frysinger wrote:
> The previous section mismatch fix for this driver wasn't entirely correct.
> The sst25l_flash_info array is now used in the devinit probe func, but is
> marked as initdata, so building results in the warning:
> 
> WARNING: drivers/mtd/devices/sst25l.o(.devinit.text): Section mismatch
> 	in reference from the function sst25l_probe()
> 	to the variable .init.data:sst25l_flash_info
> 
> Further, the remove func should be devexit rather than exit to match the
> probe func.
> 
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Pushed to l2-mtd-2.6.git, thanks.
diff mbox

Patch

diff --git a/drivers/mtd/devices/sst25l.c b/drivers/mtd/devices/sst25l.c
index c163e61..ac1d244 100644
--- a/drivers/mtd/devices/sst25l.c
+++ b/drivers/mtd/devices/sst25l.c
@@ -66,7 +66,7 @@  struct flash_info {
 
 #define to_sst25l_flash(x) container_of(x, struct sst25l_flash, mtd)
 
-static struct flash_info __initdata sst25l_flash_info[] = {
+static struct flash_info __devinitdata sst25l_flash_info[] = {
 	{"sst25lf020a", 0xbf43, 256, 1024, 4096},
 	{"sst25lf040a",	0xbf44,	256, 2048, 4096},
 };
@@ -469,7 +469,7 @@  static int __devinit sst25l_probe(struct spi_device *spi)
 	return 0;
 }
 
-static int __exit sst25l_remove(struct spi_device *spi)
+static int __devexit sst25l_remove(struct spi_device *spi)
 {
 	struct sst25l_flash *flash = dev_get_drvdata(&spi->dev);
 	int ret;
@@ -490,7 +490,7 @@  static struct spi_driver sst25l_driver = {
 		.owner	= THIS_MODULE,
 	},
 	.probe		= sst25l_probe,
-	.remove		= __exit_p(sst25l_remove),
+	.remove		= __devexit_p(sst25l_remove),
 };
 
 static int __init sst25l_init(void)