summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-efm32.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2014-07-11 08:17:57 (GMT)
committerMark Brown <broonie@linaro.org>2014-07-11 12:39:36 (GMT)
commit10ed7e9847b62043ab488dbb3ff6cd9f26038568 (patch)
tree0f66802db478bda73015bf75f63ae114428ed37e /drivers/spi/spi-efm32.c
parent7171511eaec5bf23fb06078f59784a3a0626b38f (diff)
downloadlinux-10ed7e9847b62043ab488dbb3ff6cd9f26038568.tar.xz
spi: efm32: correct namespacing of location property
Olof Johansson pointed out that usually the company name is picked as namespace prefix to specific properties. So expect "energymicro,location" but fall back to the previously introduced name "efm32,location". Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-efm32.c')
-rw-r--r--drivers/spi/spi-efm32.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/spi/spi-efm32.c b/drivers/spi/spi-efm32.c
index be44a3e..6caeb1c 100644
--- a/drivers/spi/spi-efm32.c
+++ b/drivers/spi/spi-efm32.c
@@ -294,10 +294,16 @@ static void efm32_spi_probe_dt(struct platform_device *pdev,
u32 location;
int ret;
- ret = of_property_read_u32(np, "efm32,location", &location);
+ ret = of_property_read_u32(np, "energymicro,location", &location);
+
+ if (ret)
+ /* fall back to wrongly namespaced property */
+ ret = of_property_read_u32(np, "efm32,location", &location);
+
if (ret)
/* fall back to old and (wrongly) generic property "location" */
ret = of_property_read_u32(np, "location", &location);
+
if (!ret) {
dev_dbg(&pdev->dev, "using location %u\n", location);
} else {