From: Linus Walleij Date: Fri, 12 Dec 2014 10:22:11 +0000 (+0100) Subject: gpio: mcp23s08: fix up compilation error X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=170680abd1eb98a9773ed068435fef9a6402a10f;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Suggested-by: Linus Torvalds Signed-off-by: Linus Walleij --- 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, 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;