diff options
author | Alexander Shiyan <shc_work@mail.ru> | 2013-05-06 13:53:50 (GMT) |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2013-08-05 19:45:16 (GMT) |
commit | ee4f36663b2a3626a9dadb2679a0ddcff1371891 (patch) | |
tree | 1c94ff697a10522203c643aa26fa014c9afe973e | |
parent | c85d32d56859bb01f775e12771150dc47a7b03ba (diff) | |
download | linux-ee4f36663b2a3626a9dadb2679a0ddcff1371891.tar.xz |
mtd: nand-gpio: Do not override GPIOs if driver uses platform_data but OF is enabled in kernel config
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
-rw-r--r-- | drivers/mtd/nand/gpio.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mtd/nand/gpio.c b/drivers/mtd/nand/gpio.c index 8f102d1..0d26f8b 100644 --- a/drivers/mtd/nand/gpio.c +++ b/drivers/mtd/nand/gpio.c @@ -151,6 +151,9 @@ static int gpio_nand_get_config_of(const struct device *dev, { u32 val; + if (!dev->of_node) + return -ENODEV; + if (!of_property_read_u32(dev->of_node, "bank-width", &val)) { if (val == 2) { plat->options |= NAND_BUSWIDTH_16; |