mtd: davinci_nand: fix modular build with CONFIG_OF=y

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Jan 11 11:59:01 EST 2013


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=7a9c83888761a9a26049b439dc0b09e7ea8a854b
Commit:     7a9c83888761a9a26049b439dc0b09e7ea8a854b
Parent:     5a40b5fb2bb3a4d1c20149fe47ab25409026ee2e
Author:     Sergei Shtylyov <sshtylyov at ru.mvista.com>
AuthorDate: Thu Jan 3 21:27:34 2013 +0300
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Jan 11 16:53:24 2013 +0000

    mtd: davinci_nand: fix modular build with CONFIG_OF=y
    
    Commit cdeadd712f52b16a9285386d61ee26fd14eb4085 (mtd: nand: davinci: add OF
    support for davinci nand controller) has never been really build tested with
    the driver as a module.  When the driver is built-in, the missing semicolon
    after structure initializer is "compensated" by MODULE_DEVICE_TABLE() macro
    being empty and so the initializer using the trailing semicolon on the next
    line; when the driver is built as a module, compilation error ensues, and as
    the 'davinci_all_defconfig' has the NAND driver modular, this error prevents
    DaVinci family kernel from building...
    
    Signed-off-by: Sergei Shtylyov <sshtylyov at ru.mvista.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
    Cc: stable at vger.kernel.org # 3.7
---
 drivers/mtd/nand/davinci_nand.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
index 3502606..feae55c 100644
--- a/drivers/mtd/nand/davinci_nand.c
+++ b/drivers/mtd/nand/davinci_nand.c
@@ -523,7 +523,7 @@ static struct nand_ecclayout hwecc4_2048 __initconst = {
 static const struct of_device_id davinci_nand_of_match[] = {
 	{.compatible = "ti,davinci-nand", },
 	{},
-}
+};
 MODULE_DEVICE_TABLE(of, davinci_nand_of_match);
 
 static struct davinci_nand_pdata



More information about the linux-mtd-cvs mailing list