History

gpio: generic: make bgpio_pdata always visible

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.

Arnd Bergmann committed 10 years ago

Commit c474e341 parent 96098df1 file · +2 −2Browse files

Unified · Split

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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t