From patchwork Thu Jan 3 18:27:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 1928421 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) by patchwork2.kernel.org (Postfix) with ESMTP id 34CFADF25A for ; Thu, 3 Jan 2013 17:33:06 +0000 (UTC) Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id r03HTDhb000556; Thu, 3 Jan 2013 11:29:13 -0600 Received: from DLEE74.ent.ti.com (dlee74.ent.ti.com [157.170.170.8]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id r03HTDWf016768; Thu, 3 Jan 2013 11:29:13 -0600 Received: from dlelxv24.itg.ti.com (172.17.1.199) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Thu, 3 Jan 2013 11:29:13 -0600 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv24.itg.ti.com (8.13.8/8.13.8) with ESMTP id r03HTCgk016266; Thu, 3 Jan 2013 11:29:12 -0600 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id DC75280627; Thu, 3 Jan 2013 11:29:12 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp52.itg.ti.com (dflp52.itg.ti.com [128.247.22.96]) by linux.omap.com (Postfix) with ESMTP id 9AA6580626 for ; Thu, 3 Jan 2013 11:29:11 -0600 (CST) Received: from red.ext.ti.com (red.ext.ti.com [192.94.93.37]) by dflp52.itg.ti.com (8.13.7/8.13.8) with ESMTP id r03HTBHb028219 for ; Thu, 3 Jan 2013 11:29:11 -0600 (CST) Received: from psmtp.com (na3sys009amx216.postini.com [74.125.149.56]) by red.ext.ti.com (8.13.7/8.13.7) with SMTP id r03HT7k7006326 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 3 Jan 2013 11:29:09 -0600 Received: from wasted.dev.rtsoft.ru ([213.79.90.226]) (using TLSv1) by na3sys009amx216.postini.com ([74.125.148.10]) with SMTP; Thu, 03 Jan 2013 12:29:10 EST Received: from wasted.dev.rtsoft.ru (localhost.localdomain [127.0.0.1]) by wasted.dev.rtsoft.ru (8.14.4/8.14.4) with ESMTP id r03IRZn8020427; Thu, 3 Jan 2013 21:27:35 +0300 Received: (from headless@localhost) by wasted.dev.rtsoft.ru (8.14.4/8.14.4/Submit) id r03IRYi1020425; Thu, 3 Jan 2013 21:27:34 +0300 X-Authentication-Warning: wasted.dev.rtsoft.ru: headless set sender to sshtylyov@ru.mvista.com using -f To: , Subject: [PATCH v2] davinci_nand: fix modular build with CONFIG_OF=y From: Sergei Shtylyov Organization: MontaVista Software LLC Date: Thu, 3 Jan 2013 21:27:34 +0300 MIME-Version: 1.0 Message-ID: <201301032127.34467.sshtylyov@ru.mvista.com> X-pstn-levels: (S:99.90000/99.90000 CV:99.9000 FC:95.5390 LC:95.5390 R:95.9108 P:95.9108 M:97.0282 C:98.6951 ) X-pstn-dkim: 0 skipped:no-policies X-pstn-settings: 2 (0.5000:0.5000) s cv gt3 gt2 gt1 r p m c X-pstn-addresses: from [82/3] CC: , X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com 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 Cc: stable@vger.kernel.org # 3.7 Acked-by: Sekhar Nori Acked-by: Heiko Schocher --- 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