diff mbox series

[v2,06/22] mtd: rawnand: ams-delta: Allow this driver to be compiled when COMPILE_TEST=y

Message ID 20181106150810.9569-7-boris.brezillon@bootlin.com
State Changes Requested
Delegated to: Miquel Raynal
Headers show
Series mtd: rawnand: 3rd batch of cleanup | expand

Commit Message

Boris Brezillon Nov. 6, 2018, 3:07 p.m. UTC
Drop the asm and mach headers inclusion and allow this driver to be
compiled when COMPILE_TEST=y in order to increase compile-test
coverage.

Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
---
Changes in v2:
- New patch
---
 drivers/mtd/nand/raw/Kconfig     | 2 +-
 drivers/mtd/nand/raw/ams-delta.c | 5 -----
 2 files changed, 1 insertion(+), 6 deletions(-)

Comments

Boris Brezillon Nov. 6, 2018, 4:56 p.m. UTC | #1
On Tue,  6 Nov 2018 16:07:54 +0100
Boris Brezillon <boris.brezillon@bootlin.com> wrote:

> Drop the asm and mach headers inclusion and allow this driver to be
> compiled when COMPILE_TEST=y in order to increase compile-test
> coverage.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
> ---
> Changes in v2:
> - New patch
> ---
>  drivers/mtd/nand/raw/Kconfig     | 2 +-
>  drivers/mtd/nand/raw/ams-delta.c | 5 -----
>  2 files changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
> index c7efc31384d5..1a55d3e3d4c5 100644
> --- a/drivers/mtd/nand/raw/Kconfig
> +++ b/drivers/mtd/nand/raw/Kconfig
> @@ -70,7 +70,7 @@ config MTD_NAND_GPIO
>  
>  config MTD_NAND_AMS_DELTA
>  	tristate "NAND Flash device on Amstrad E3"
> -	depends on MACH_AMS_DELTA
> +	depends on MACH_AMS_DELTA || COMPILE_TEST
>  	default y
>  	help
>  	  Support for NAND flash on Amstrad E3 (Delta).
> diff --git a/drivers/mtd/nand/raw/ams-delta.c b/drivers/mtd/nand/raw/ams-delta.c
> index 9ca70aab199d..37dec9ee9239 100644
> --- a/drivers/mtd/nand/raw/ams-delta.c
> +++ b/drivers/mtd/nand/raw/ams-delta.c
> @@ -26,11 +26,6 @@
>  #include <linux/mtd/partitions.h>
>  #include <linux/platform_data/gpio-omap.h>
>  
> -#include <asm/io.h>
> -#include <asm/sizes.h>

Looks like linux/io.h and linux/sizes.h were indirectly included when
compiling for ARM, which is not necessarily the case (kbuild robots
report an error when compiling for sparc64).

I'll add

#include <linux/io.h>
#include <linux/sizes.h>

in v3.

> -
> -#include <mach/hardware.h>
> -
>  /*
>   * MTD structure for E3 (Delta)
>   */
diff mbox series

Patch

diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
index c7efc31384d5..1a55d3e3d4c5 100644
--- a/drivers/mtd/nand/raw/Kconfig
+++ b/drivers/mtd/nand/raw/Kconfig
@@ -70,7 +70,7 @@  config MTD_NAND_GPIO
 
 config MTD_NAND_AMS_DELTA
 	tristate "NAND Flash device on Amstrad E3"
-	depends on MACH_AMS_DELTA
+	depends on MACH_AMS_DELTA || COMPILE_TEST
 	default y
 	help
 	  Support for NAND flash on Amstrad E3 (Delta).
diff --git a/drivers/mtd/nand/raw/ams-delta.c b/drivers/mtd/nand/raw/ams-delta.c
index 9ca70aab199d..37dec9ee9239 100644
--- a/drivers/mtd/nand/raw/ams-delta.c
+++ b/drivers/mtd/nand/raw/ams-delta.c
@@ -26,11 +26,6 @@ 
 #include <linux/mtd/partitions.h>
 #include <linux/platform_data/gpio-omap.h>
 
-#include <asm/io.h>
-#include <asm/sizes.h>
-
-#include <mach/hardware.h>
-
 /*
  * MTD structure for E3 (Delta)
  */