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>
This commit is contained in:
Alexander Shiyan 2013-05-06 17:53:50 +04:00 committed by David Woodhouse
parent c85d32d568
commit ee4f36663b

View File

@ -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;