From mboxrd@z Thu Jan 1 00:00:00 1970 From: b32955@freescale.com (Huang Shijie) Date: Wed, 13 Apr 2011 09:41:50 +0800 Subject: [PATCH V4 2/4] MTD : add the common code for GPMI controller driver In-Reply-To: References: <1301722240-15406-1-git-send-email-b32955@freescale.com> <1301722240-15406-3-git-send-email-b32955@freescale.com> Message-ID: <4DA4FF5E.2090406@freescale.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi, > Hi, > > I have one correction to your NAND driver. Please see inlined comments. > >> These files contain the common code for the GPMI driver. >> >> Signed-off-by: Huang Shijie >> --- >> drivers/mtd/nand/gpmi-nfc/gpmi-nfc-main.c | 2453 >> +++++++++++++++++++++++++++++ >> drivers/mtd/nand/gpmi-nfc/gpmi-nfc.h | 551 +++++++ >> 2 files changed, 3004 insertions(+), 0 deletions(-) >> create mode 100644 drivers/mtd/nand/gpmi-nfc/gpmi-nfc-main.c >> create mode 100644 drivers/mtd/nand/gpmi-nfc/gpmi-nfc.h >> >> diff --git a/drivers/mtd/nand/gpmi-nfc/gpmi-nfc-main.c >> b/drivers/mtd/nand/gpmi-nfc/gpmi-nfc-main.c >> new file mode 100644 >> index 0000000..7bbc448 >> --- /dev/null >> +++ b/drivers/mtd/nand/gpmi-nfc/gpmi-nfc-main.c >> @@ -0,0 +1,2453 @@ > > >> +#ifdef CONFIG_PM >> +static int gpmi_nfc_suspend(struct platform_device *pdev, > pm_message_t >> state) >> +{ >> + return 0; >> +} >> + >> +static int gpmi_nfc_resume(struct platform_device *pdev) >> +{ >> + return 0; >> +} >> +#else >> +#define suspend NULL >> +#define resume NULL >> +#endif > If CONFIG_PM is disabled your defines don't match function names. thanks. > > >> +/* This structure represents this driver to the platform management >> system. */ >> +static struct platform_driver gpmi_nfc_driver = { >> + .driver = { >> + .name = GPMI_NFC_DRIVER_NAME, >> + }, >> + .probe = gpmi_nfc_probe, >> + .remove = __exit_p(gpmi_nfc_remove), >> + .suspend = gpmi_nfc_suspend, >> + .resume = gpmi_nfc_resume, >> + .id_table = gpmi_ids, >> +}; > This section fails to compile as gpmi_nfc_suspend and gpmi_nfc_resume > are undefined. It compiles fine if I add gpmi_nfc_ prefix to defines. thanks. I will fix it in next version. Best Regards Huang Shijie > -- > Veli-Pekka Peltola > R&D Engineer > Bluegiga Technologies > >