Patchwork [MTD,NAND] fix section error in plat_nand

login
register
mail settings
Submitter Thomas Chou
Date April 21, 2009, 4:27 a.m.
Message ID <1240288054-11396-1-git-send-email-thomas@wytron.com.tw>
Download mbox | patch
Permalink /patch/26220/
State New
Headers show

Comments

Thomas Chou - April 21, 2009, 4:27 a.m.
With CONFIG_HOTPLUG=n, the following eror occurred during link:
local symbol 0: discarded in section `.devexit.text' from
drivers/built-in.o

It was caused by improper section reference. The __devexit_p()
should be added to the .remove function.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
---
 drivers/mtd/nand/plat_nand.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Artem Bityutskiy - April 21, 2009, 5:53 a.m.
On Tue, 2009-04-21 at 12:27 +0800, Thomas Chou wrote:
> With CONFIG_HOTPLUG=n, the following eror occurred during link:
> local symbol 0: discarded in section `.devexit.text' from
> drivers/built-in.o
> 
> It was caused by improper section reference. The __devexit_p()
> should be added to the .remove function.
> 
> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>

Taken to l2-mtd tree, thanks.

Patch

diff --git a/drivers/mtd/nand/plat_nand.c b/drivers/mtd/nand/plat_nand.c
index 75f9f48..1b67619 100644
--- a/drivers/mtd/nand/plat_nand.c
+++ b/drivers/mtd/nand/plat_nand.c
@@ -128,7 +128,7 @@  static int __devexit plat_nand_remove(struct platform_device *pdev)
 
 static struct platform_driver plat_nand_driver = {
 	.probe		= plat_nand_probe,
-	.remove		= plat_nand_remove,
+	.remove		= __devexit_p(plat_nand_remove),
 	.driver		= {
 		.name	= "gen_nand",
 		.owner	= THIS_MODULE,