Commit 170680ab authored by Linus Walleij's avatar Linus Walleij

gpio: mcp23s08: fix up compilation error

The driver depends on the chip.of_node being present to compile,
which is the case on some target platforms but not others.
Instead, rely on chip.dev->of_node to be used, as struct device
always has an of_node in place.

Cc: Alexander Stein <alexander.stein@systec-electronic.com>
Suggested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 256965d7
...@@ -655,7 +655,8 @@ static int mcp23s08_probe_one(struct mcp23s08 *mcp, struct device *dev, ...@@ -655,7 +655,8 @@ static int mcp23s08_probe_one(struct mcp23s08 *mcp, struct device *dev,
mcp->irq_controller = pdata->irq_controller; mcp->irq_controller = pdata->irq_controller;
if (mcp->irq && mcp->irq_controller) { if (mcp->irq && mcp->irq_controller) {
mcp->irq_active_high = of_property_read_bool(mcp->chip.of_node, mcp->irq_active_high =
of_property_read_bool(mcp->chip.dev->of_node,
"microchip,irq-active-high"); "microchip,irq-active-high");
if (type == MCP_TYPE_017) if (type == MCP_TYPE_017)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment