diff mbox

[13/13] mtd: nand: fsmc: remove CONFIG_OF conditional

Message ID 1490090645-8576-14-git-send-email-thomas.petazzoni@free-electrons.com
State Accepted
Delegated to: Boris Brezillon
Headers show

Commit Message

Thomas Petazzoni March 21, 2017, 10:04 a.m. UTC
Since commit 4404d7d821c33 ("mtd: nand: fsmc: remove stale non-DT probe
path"), the fsmc NAND driver only supports Device Tree probing, and
therefore has a "depends on OF" in its Kconfig option.

Due to this the #ifdef CONFIG_OF ... #endif condition in the driver code
is no longer necessary.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 drivers/mtd/nand/fsmc_nand.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Boris Brezillon March 22, 2017, 10:01 p.m. UTC | #1
On Tue, 21 Mar 2017 11:04:05 +0100
Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote:

> Since commit 4404d7d821c33 ("mtd: nand: fsmc: remove stale non-DT probe
> path"), the fsmc NAND driver only supports Device Tree probing, and
> therefore has a "depends on OF" in its Kconfig option.
> 
> Due to this the #ifdef CONFIG_OF ... #endif condition in the driver code
> is no longer necessary.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  drivers/mtd/nand/fsmc_nand.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c
> index c50c3ed5..fbab0bb 100644
> --- a/drivers/mtd/nand/fsmc_nand.c
> +++ b/drivers/mtd/nand/fsmc_nand.c
> @@ -1157,14 +1157,12 @@ static int fsmc_nand_resume(struct device *dev)
>  
>  static SIMPLE_DEV_PM_OPS(fsmc_nand_pm_ops, fsmc_nand_suspend, fsmc_nand_resume);
>  
> -#ifdef CONFIG_OF
>  static const struct of_device_id fsmc_nand_id_table[] = {
>  	{ .compatible = "st,spear600-fsmc-nand" },
>  	{ .compatible = "stericsson,fsmc-nand" },
>  	{}
>  };
>  MODULE_DEVICE_TABLE(of, fsmc_nand_id_table);
> -#endif
>  
>  static struct platform_driver fsmc_nand_driver = {
>  	.remove = fsmc_nand_remove,

You probably also want to remove of_match_ptr() in

		.of_match_table = of_match_ptr(fsmc_nand_id_table),
Linus Walleij March 23, 2017, 10:07 a.m. UTC | #2
On Tue, Mar 21, 2017 at 11:04 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:

> Since commit 4404d7d821c33 ("mtd: nand: fsmc: remove stale non-DT probe
> path"), the fsmc NAND driver only supports Device Tree probing, and
> therefore has a "depends on OF" in its Kconfig option.
>
> Due to this the #ifdef CONFIG_OF ... #endif condition in the driver code
> is no longer necessary.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
diff mbox

Patch

diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c
index c50c3ed5..fbab0bb 100644
--- a/drivers/mtd/nand/fsmc_nand.c
+++ b/drivers/mtd/nand/fsmc_nand.c
@@ -1157,14 +1157,12 @@  static int fsmc_nand_resume(struct device *dev)
 
 static SIMPLE_DEV_PM_OPS(fsmc_nand_pm_ops, fsmc_nand_suspend, fsmc_nand_resume);
 
-#ifdef CONFIG_OF
 static const struct of_device_id fsmc_nand_id_table[] = {
 	{ .compatible = "st,spear600-fsmc-nand" },
 	{ .compatible = "stericsson,fsmc-nand" },
 	{}
 };
 MODULE_DEVICE_TABLE(of, fsmc_nand_id_table);
-#endif
 
 static struct platform_driver fsmc_nand_driver = {
 	.remove = fsmc_nand_remove,