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
220220
221221 struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc);
222222
223−#if IS_ENABLED(CONFIG_GPIO_GENERIC)
224−
225223 struct bgpio_pdata {
226224 const char *label;
227225 int base;
228226 int ngpio;
229227 };
230228
229+#if IS_ENABLED(CONFIG_GPIO_GENERIC)
230+
231231 int bgpio_init(struct gpio_chip *gc, struct device *dev,
232232 unsigned long sz, void __iomem *dat, void __iomem *set,
233233 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