* [PATCH] gpio: generic: make bgpio_pdata always visible
@ 2016-01-09 21:16 Arnd Bergmann
2016-01-13 15:01 ` Linus Walleij
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2016-01-09 21:16 UTC (permalink / raw)
To: linus.walleij
Cc: Alexandre Courbot, linux-gpio, linux-kernel, linux-arm-kernel,
Alexander Shiyan
Board files that define their own bgpio_pdata are broken when
CONFIG_GPIO_GENERIC is disabled and the bgpio_pdata structure
definition is hidden by the #ifdef:
arch/arm/mach-clps711x/board-autcpu12.c:148:15: error: variable 'autcpu12_mmgpio_pdata' has initializer but incomplete type
static struct bgpio_pdata autcpu12_mmgpio_pdata __initdata = {
arch/arm/mach-clps711x/board-autcpu12.c:149:2: error: unknown field 'base' specified in initializer
.base = AUTCPU12_MMGPIO_BASE,
Since the board files should generally not care what drivers are
enabled, this makes the structure definition visible again.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 0f4630f3720e ("gpio: generic: factor into gpio_chip struct")
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
index e2d05fd0e6e3..82fda487453f 100644
--- a/include/linux/gpio/driver.h
+++ b/include/linux/gpio/driver.h
@@ -220,14 +220,14 @@ static inline void *gpiochip_get_data(struct gpio_chip *chip)
struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc);
-#if IS_ENABLED(CONFIG_GPIO_GENERIC)
-
struct bgpio_pdata {
const char *label;
int base;
int ngpio;
};
+#if IS_ENABLED(CONFIG_GPIO_GENERIC)
+
int bgpio_init(struct gpio_chip *gc, struct device *dev,
unsigned long sz, void __iomem *dat, void __iomem *set,
void __iomem *clr, void __iomem *dirout, void __iomem *dirin,
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] gpio: generic: make bgpio_pdata always visible
2016-01-09 21:16 [PATCH] gpio: generic: make bgpio_pdata always visible Arnd Bergmann
@ 2016-01-13 15:01 ` Linus Walleij
0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2016-01-13 15:01 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Alexandre Courbot, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, Alexander Shiyan
On Sat, Jan 9, 2016 at 10:16 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> Board files that define their own bgpio_pdata are broken when
> CONFIG_GPIO_GENERIC is disabled and the bgpio_pdata structure
> definition is hidden by the #ifdef:
>
> arch/arm/mach-clps711x/board-autcpu12.c:148:15: error: variable 'autcpu12_mmgpio_pdata' has initializer but incomplete type
> static struct bgpio_pdata autcpu12_mmgpio_pdata __initdata = {
> arch/arm/mach-clps711x/board-autcpu12.c:149:2: error: unknown field 'base' specified in initializer
> .base = AUTCPU12_MMGPIO_BASE,
>
> Since the board files should generally not care what drivers are
> enabled, this makes the structure definition visible again.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 0f4630f3720e ("gpio: generic: factor into gpio_chip struct")
Thanks a lot, patch applied!
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-01-13 15:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-09 21:16 [PATCH] gpio: generic: make bgpio_pdata always visible Arnd Bergmann
2016-01-13 15:01 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).