diff options
author | Mark Brown <broonie@kernel.org> | 2014-09-17 11:19:04 -0700 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-09-17 11:19:04 -0700 |
commit | 6ca6974c8a3b97a00df9b6ec3b1d076d6ecf6e09 (patch) | |
tree | 195f5ea61e8dca15c8338c68b4161346758952b8 /drivers/spi/spi-orion.c | |
parent | 7dc33e02fbdf4d19e17493ff2de87a86a4ad7699 (diff) | |
parent | 0111d0f13469831266d716e3b50d580a3e25cff9 (diff) |
Merge branch 'linux-linaro-lsk-v3.14' into linux-linaro-lsk-v3.14-androidlsk-v3.14-android-14.09
Diffstat (limited to 'drivers/spi/spi-orion.c')
-rw-r--r-- | drivers/spi/spi-orion.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/spi/spi-orion.c b/drivers/spi/spi-orion.c index 7f2121fe2622..977b0619bb78 100644 --- a/drivers/spi/spi-orion.c +++ b/drivers/spi/spi-orion.c @@ -404,8 +404,6 @@ static int orion_spi_probe(struct platform_device *pdev) struct resource *r; unsigned long tclk_hz; int status = 0; - const u32 *iprop; - int size; master = spi_alloc_master(&pdev->dev, sizeof(*spi)); if (master == NULL) { @@ -416,10 +414,10 @@ static int orion_spi_probe(struct platform_device *pdev) if (pdev->id != -1) master->bus_num = pdev->id; if (pdev->dev.of_node) { - iprop = of_get_property(pdev->dev.of_node, "cell-index", - &size); - if (iprop && size == sizeof(*iprop)) - master->bus_num = *iprop; + u32 cell_index; + if (!of_property_read_u32(pdev->dev.of_node, "cell-index", + &cell_index)) + master->bus_num = cell_index; } /* we support only mode 0, and no options */ |