summaryrefslogtreecommitdiffstats
path: root/drivers/memory
diff options
context:
space:
mode:
authorLadislav Michl <ladis@linux-mips.org>2017-11-06 11:41:04 +0100
committerRoger Quadros <rogerq@ti.com>2017-12-01 15:37:49 +0200
commitc18a7ac3398d0cef29749f9568666db8321aa4c9 (patch)
treeb56110e9d5b56b28c4935f3b222a3335541a5391 /drivers/memory
parent4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323 (diff)
downloadlinux-c18a7ac3398d0cef29749f9568666db8321aa4c9.tar.bz2
memory: omap-gpmc: Make 'bank-width' property optional
Error out only if both 'bank-width' and 'gpmc,device-width' are missing. As 'bank-width' is mostly used for NOR devices and all other devices must use 'gpmc,device-width' update the error message accordingly. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Roger Quadros <rogerq@ti.com>
Diffstat (limited to 'drivers/memory')
-rw-r--r--drivers/memory/omap-gpmc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index a385a35c7de9..0e30ee1c8677 100644
--- a/drivers/memory/omap-gpmc.c
+++ b/drivers/memory/omap-gpmc.c
@@ -2077,8 +2077,9 @@ static int gpmc_probe_generic_child(struct platform_device *pdev,
} else {
ret = of_property_read_u32(child, "bank-width",
&gpmc_s.device_width);
- if (ret < 0) {
- dev_err(&pdev->dev, "%pOF has no 'bank-width' property\n",
+ if (ret < 0 && !gpmc_s.device_width) {
+ dev_err(&pdev->dev,
+ "%pOF has no 'gpmc,device-width' property\n",
child);
goto err;
}