Skip to content

Commit e7c86c7

Browse files
olofjRussell King
authored andcommitted
ARM: 7156/1: l2x0: fix compile error on !CONFIG_USE_OF
fae2b89 (ARM: l2x0: add empty l2x0_of_init) adds a static inline function that returns -ENODEV, but at least on tegra cache-l2x0.h is included without errno.h being pulled in first, resulting in compile errors if OF isn't enabled: In file included from arch/arm/mach-tegra/common.c:26: arch/arm/include/asm/hardware/cache-l2x0.h: In function 'l2x0_of_init': arch/arm/include/asm/hardware/cache-l2x0.h:110: error: 'ENODEV' undeclared (first use in this function) arch/arm/include/asm/hardware/cache-l2x0.h:110: error: (Each undeclared identifier is reported only once arch/arm/include/asm/hardware/cache-l2x0.h:110: error: for each function it appears in.) Add errno.h to the include file to make it self-contained. Signed-off-by: Olof Johansson <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Russell King <[email protected]>
1 parent 1a1f2be commit e7c86c7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/arm/include/asm/hardware/cache-l2x0.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
#ifndef __ASM_ARM_HARDWARE_L2X0_H
2121
#define __ASM_ARM_HARDWARE_L2X0_H
2222

23+
#include <linux/errno.h>
24+
2325
#define L2X0_CACHE_ID 0x000
2426
#define L2X0_CACHE_TYPE 0x004
2527
#define L2X0_CTRL 0x100

0 commit comments

Comments
 (0)