diff mbox series

[v2,6/7] common: board_r: include asm-generic/gpio.h

Message ID 20220101171332.2676936-6-ovidiu.panait@windriver.com
State Accepted
Commit fd765b0eeb2c71e14b98724ac6696cbd551e85df
Delegated to: Tom Rini
Headers show
Series [v2,1/7] common: spl: move armv7m-specific code to spl_perform_fixups() | expand

Commit Message

Ovidiu Panait Jan. 1, 2022, 5:13 p.m. UTC
Not all architectures define <asm/gpio.h> and even on those that do, the
header cannot be included for all boards without causing various build
failures.

Since common/board_r.c only needs gpio_hog_probe_all() declaration, include
<asm-generic/gpio.h> and drop the associated ifdef.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
---

(no changes since v1)

 common/board_r.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Tom Rini Jan. 18, 2022, 5:40 p.m. UTC | #1
On Sat, Jan 01, 2022 at 07:13:30PM +0200, Ovidiu Panait wrote:

> Not all architectures define <asm/gpio.h> and even on those that do, the
> header cannot be included for all boards without causing various build
> failures.
> 
> Since common/board_r.c only needs gpio_hog_probe_all() declaration, include
> <asm-generic/gpio.h> and drop the associated ifdef.
> 
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/common/board_r.c b/common/board_r.c
index 7c45e494ed..be225d8f87 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -66,9 +66,7 @@ 
 #include <linux/err.h>
 #include <efi_loader.h>
 #include <wdt.h>
-#if defined(CONFIG_GPIO_HOG)
-#include <asm/gpio.h>
-#endif
+#include <asm-generic/gpio.h>
 #ifdef CONFIG_EFI_SETUP_EARLY
 #include <efi_loader.h>
 #endif