gpio: mcp23s08: fix up compilation error
authorLinus Walleij <linus.walleij@linaro.org>
Fri, 12 Dec 2014 10:22:11 +0000 (11:22 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 12 Dec 2014 10:22:11 +0000 (11:22 +0100)
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>
drivers/gpio/gpio-mcp23s08.c

index 93ee7da2d8b08576eef4b6be29da9188ac669616..da9c316059bc876ba459832ca7ce01513c389897 100644 (file)
@@ -655,8 +655,9 @@ static int mcp23s08_probe_one(struct mcp23s08 *mcp, struct device *dev,
 
        mcp->irq_controller = pdata->irq_controller;
        if (mcp->irq && mcp->irq_controller) {
-               mcp->irq_active_high = of_property_read_bool(mcp->chip.of_node,
-                               "microchip,irq-active-high");
+               mcp->irq_active_high =
+                       of_property_read_bool(mcp->chip.dev->of_node,
+                                             "microchip,irq-active-high");
 
                if (type == MCP_TYPE_017)
                        mirror = pdata->mirror;
This page took 0.024785 seconds and 5 git commands to generate.