diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2014-12-12 05:22:11 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2014-12-12 05:22:11 -0500 |
commit | 170680abd1eb98a9773ed068435fef9a6402a10f (patch) | |
tree | ea9cea0e4e1a6e2b4cbc6ee85a25aaeeea0f6814 | |
parent | 256965d724347a9fa1cce42dc30987e7d92addb3 (diff) |
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: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | drivers/gpio/gpio-mcp23s08.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-mcp23s08.c b/drivers/gpio/gpio-mcp23s08.c index 93ee7da2d8b0..da9c316059bc 100644 --- a/drivers/gpio/gpio-mcp23s08.c +++ b/drivers/gpio/gpio-mcp23s08.c | |||
@@ -655,8 +655,9 @@ static int mcp23s08_probe_one(struct mcp23s08 *mcp, struct device *dev, | |||
655 | 655 | ||
656 | mcp->irq_controller = pdata->irq_controller; | 656 | mcp->irq_controller = pdata->irq_controller; |
657 | if (mcp->irq && mcp->irq_controller) { | 657 | if (mcp->irq && mcp->irq_controller) { |
658 | mcp->irq_active_high = of_property_read_bool(mcp->chip.of_node, | 658 | mcp->irq_active_high = |
659 | "microchip,irq-active-high"); | 659 | of_property_read_bool(mcp->chip.dev->of_node, |
660 | "microchip,irq-active-high"); | ||
660 | 661 | ||
661 | if (type == MCP_TYPE_017) | 662 | if (type == MCP_TYPE_017) |
662 | mirror = pdata->mirror; | 663 | mirror = pdata->mirror; |