diff options
author | Alexander Shiyan <shc_work@mail.ru> | 2013-05-06 15:53:50 +0200 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2013-08-05 21:45:16 +0200 |
commit | ee4f36663b2a3626a9dadb2679a0ddcff1371891 (patch) | |
tree | 1c94ff697a10522203c643aa26fa014c9afe973e /drivers/mtd/nand/gpio.c | |
parent | mtd: nand-gpio: Use default dev_ready function if RDY is missing in configura... (diff) | |
download | linux-ee4f36663b2a3626a9dadb2679a0ddcff1371891.tar.xz linux-ee4f36663b2a3626a9dadb2679a0ddcff1371891.zip |
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>
Diffstat (limited to 'drivers/mtd/nand/gpio.c')
-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 8f102d162126..0d26f8b7d9d0 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; |