diff options
author | Boris Brezillon <boris.brezillon@bootlin.com> | 2018-07-18 11:56:51 +0300 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2018-07-31 10:45:51 +0300 |
commit | d166541e9031daff120cac212f1917eff93c07d3 (patch) | |
tree | a6437f89064cab488921afb4d3971e55342f390a /drivers/mtd/nand/raw/orion_nand.c | |
parent | c81d28ad4fe8899f3a17b204eeec6d37d698dd5b (diff) | |
download | linux-d166541e9031daff120cac212f1917eff93c07d3.tar.xz |
mtd: rawnand: orion: Handle cases where __LINUX_ARM_ARCH__ is not defined
Make sure __LINUX_ARM_ARCH__ is defined before testing its value.
This is needed if we want to allow selection of this driver when
COMPILE_TEST=y.
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'drivers/mtd/nand/raw/orion_nand.c')
-rw-r--r-- | drivers/mtd/nand/raw/orion_nand.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/nand/raw/orion_nand.c b/drivers/mtd/nand/raw/orion_nand.c index 27cc902545f3..52d435285a3f 100644 --- a/drivers/mtd/nand/raw/orion_nand.c +++ b/drivers/mtd/nand/raw/orion_nand.c @@ -52,7 +52,7 @@ static void orion_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) { struct nand_chip *chip = mtd_to_nand(mtd); void __iomem *io_base = chip->IO_ADDR_R; -#if __LINUX_ARM_ARCH__ >= 5 +#if defined(__LINUX_ARM_ARCH__) && __LINUX_ARM_ARCH__ >= 5 uint64_t *buf64; #endif int i = 0; @@ -61,7 +61,7 @@ static void orion_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) *buf++ = readb(io_base); len--; } -#if __LINUX_ARM_ARCH__ >= 5 +#if defined(__LINUX_ARM_ARCH__) && __LINUX_ARM_ARCH__ >= 5 buf64 = (uint64_t *)buf; while (i < len/8) { /* |