From patchwork Wed Apr 29 05:33:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madalin Bucur \(OSS\)" X-Patchwork-Id: 238829 List-Id: U-Boot discussion From: madalin.bucur at oss.nxp.com (Madalin Bucur) Date: Wed, 29 Apr 2020 08:33:33 +0300 Subject: [PATCH] powerpc/mpc85xx: Fix compiling error with DM_GPIO Message-ID: <1588138413-18330-1-git-send-email-madalin.bucur@oss.nxp.com> P4080DS compilation fails with DM_GPIO enabled: drivers/gpio/gpio-uclass.c:355:5: error: redefinition of 'gpio_request' int gpio_request(unsigned gpio, const char *label) ^~~~~~~~~~~~ In file included from ./arch/powerpc/include/asm/arch/gpio.h:17:0, from ./arch/powerpc/include/asm/gpio.h:1, from drivers/gpio/gpio-uclass.c:16: ./arch/powerpc/include/asm/mpc85xx_gpio.h:68:19: note: previous definition of 'gpio_request' was here static inline int gpio_request(unsigned gpio, const char *label) ^~~~~~~~~~~~ Signed-off-by: Madalin Bucur --- arch/powerpc/include/asm/mpc85xx_gpio.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/mpc85xx_gpio.h b/arch/powerpc/include/asm/mpc85xx_gpio.h index 1b332f0..feebe15 100644 --- a/arch/powerpc/include/asm/mpc85xx_gpio.h +++ b/arch/powerpc/include/asm/mpc85xx_gpio.h @@ -6,6 +6,7 @@ #ifndef POWERPC_ASM_MPC85XX_GPIO_H_ #define POWERPC_ASM_MPC85XX_GPIO_H_ +#ifndef CONFIG_DM_GPIO # include /* @@ -110,5 +111,5 @@ static inline int gpio_is_valid(int gpio) { return (gpio >= 0) && (gpio < 32); } - +#endif /* not CONFIG_DM_GPIO */ #endif /* not POWERPC_ASM_MPC85XX_GPIO_H_ */