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>
This commit is contained in:
committed by
Miquel Raynal
parent
c81d28ad4f
commit
d166541e90
@ -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) {
|
||||
/*
|
||||
|
Reference in New Issue
Block a user