diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2014-07-11 10:50:14 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2014-07-17 15:38:49 +0200 |
commit | 281ec367bff42304e0dc5cbc8d267ce9251478b7 (patch) | |
tree | e68fe3abd7d16b4b2149033758548c9257b2efe7 /drivers/i2c/busses | |
parent | 290025d9ffd6ba48b4e18e65e4a9aa668383fbf5 (diff) | |
download | op-kernel-dev-281ec367bff42304e0dc5cbc8d267ce9251478b7.zip op-kernel-dev-281ec367bff42304e0dc5cbc8d267ce9251478b7.tar.gz |
i2c: 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: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses')
-rw-r--r-- | drivers/i2c/busses/i2c-efm32.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-efm32.c b/drivers/i2c/busses/i2c-efm32.c index f7eccd6..10b8323 100644 --- a/drivers/i2c/busses/i2c-efm32.c +++ b/drivers/i2c/busses/i2c-efm32.c @@ -370,7 +370,13 @@ static int efm32_i2c_probe(struct platform_device *pdev) return 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) { dev_dbg(&pdev->dev, "using location %u\n", location); } else { |