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.
Unified · Split
| @@ -220,14 +220,14 @@ static inline void *gpiochip_get_data(struct gpio_chip *chip) · 219 unmodified lines | ||
| 220 | 220 | |
| 221 | 221 | struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc); |
| 222 | 222 | |
| 223 | −#if IS_ENABLED(CONFIG_GPIO_GENERIC) | |
| 224 | − | |
| 225 | 223 | struct bgpio_pdata { |
| 226 | 224 | const char *label; |
| 227 | 225 | int base; |
| 228 | 226 | int ngpio; |
| 229 | 227 | }; |
| 230 | 228 | |
| 229 | +#if IS_ENABLED(CONFIG_GPIO_GENERIC) | |
| 230 | + | |
| 231 | 231 | int bgpio_init(struct gpio_chip *gc, struct device *dev, |
| 232 | 232 | unsigned long sz, void __iomem *dat, void __iomem *set, |
| 233 | 233 | void __iomem *clr, void __iomem *dirout, void __iomem *dirin, |