diff mbox

[v2] davinci_nand: fix modular build with CONFIG_OF=y

Message ID 201301032127.34467.sshtylyov@ru.mvista.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Sergei Shtylyov Jan. 3, 2013, 6:27 p.m. UTC
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@ru.mvista.com>
Cc: stable@vger.kernel.org # 3.7

---
The patch is atop of the recent Linus' tree.
Sekhar, have you build tested at least 3.8-rc1?

 drivers/mtd/nand/davinci_nand.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sekhar Nori Jan. 4, 2013, 5:52 a.m. UTC | #1
Hi Sergei,

On 1/3/2013 11:57 PM, Sergei Shtylyov wrote:
> 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@ru.mvista.com>
> Cc: stable@vger.kernel.org # 3.7
> 
> ---
> The patch is atop of the recent Linus' tree.
> Sekhar, have you build tested at least 3.8-rc1?

v3.8-rc2 builds and boots fine. 'make modules' needs your patch, of
course. For this patch, FWIW:

Acked-by: Sekhar Nori <nsekhar@ti.com>

Thanks,
Sekhar
Heiko Schocher Jan. 4, 2013, 6:40 a.m. UTC | #2
Hello Sergei

On 03.01.2013 19:27, Sergei Shtylyov wrote:
> 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@ru.mvista.com>
> Cc: stable@vger.kernel.org # 3.7
>
> ---
> The patch is atop of the recent Linus' tree.
> Sekhar, have you build tested at least 3.8-rc1?
>
>   drivers/mtd/nand/davinci_nand.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: linux/drivers/mtd/nand/davinci_nand.c
> ===================================================================
> --- linux.orig/drivers/mtd/nand/davinci_nand.c
> +++ linux/drivers/mtd/nand/davinci_nand.c
> @@ -523,7 +523,7 @@ static struct nand_ecclayout hwecc4_2048
>   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

Acked-by: Heiko Schocher <hs@denx.de>

Thanks for detecting this!

bye,
Heiko
David Woodhouse Jan. 11, 2013, 4:54 p.m. UTC | #3
On Fri, 2013-01-11 at 20:44 +0300, Sergei Shtylyov wrote:
> 
> > The patch is atop of the recent Linus' tree.
> 
>    OK, a week has passed. Anybody going to queue this up for 3.8?

I've just applied it to my tree; I'll send it in a day or so. Thanks for
the reminder.
Sergei Shtylyov Jan. 11, 2013, 5:44 p.m. UTC | #4
Hello.

On 01/03/2013 09:27 PM, Sergei Shtylyov wrote:

> 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@ru.mvista.com>
> Cc: stable@vger.kernel.org # 3.7

> ---
> The patch is atop of the recent Linus' tree.

   OK, a week has passed. Anybody going to queue this up for 3.8?

WBR, Sergei
diff mbox

Patch

Index: linux/drivers/mtd/nand/davinci_nand.c
===================================================================
--- linux.orig/drivers/mtd/nand/davinci_nand.c
+++ linux/drivers/mtd/nand/davinci_nand.c
@@ -523,7 +523,7 @@  static struct nand_ecclayout hwecc4_2048
 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