Skip to content

Commit 60f749f

Browse files
committed
gpio: mcp23s08: make driver depend on OF_GPIO
The MCP23S08 driver certainly accesses fields inside the struct gpio_chip that are only available under CONFIG_OF_GPIO not just CONFIG_OF, so update the Kconfig and driver to reflect this. Cc: Alexander Stein <[email protected]> Cc: Phil Reid <[email protected]> Reported-by: kbuild test robot <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
1 parent c6c8649 commit 60f749f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

drivers/gpio/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,6 +1131,7 @@ menu "SPI or I2C GPIO expanders"
11311131

11321132
config GPIO_MCP23S08
11331133
tristate "Microchip MCP23xxx I/O expander"
1134+
depends on OF_GPIO
11341135
select GPIOLIB_IRQCHIP
11351136
help
11361137
SPI/I2C driver for Microchip MCP23S08/MCP23S17/MCP23008/MCP23017

drivers/gpio/gpio-mcp23s08.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ static int mcp23s08_probe_one(struct mcp23s08 *mcp, struct device *dev,
564564
mcp->chip.direction_output = mcp23s08_direction_output;
565565
mcp->chip.set = mcp23s08_set;
566566
mcp->chip.dbg_show = mcp23s08_dbg_show;
567-
#ifdef CONFIG_OF
567+
#ifdef CONFIG_OF_GPIO
568568
mcp->chip.of_gpio_n_cells = 2;
569569
mcp->chip.of_node = dev->of_node;
570570
#endif

0 commit comments

Comments
 (0)