diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-11-11 10:13:41 +0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-11-24 18:15:10 +0400 |
commit | 160a061301c7adf54c40696e7ceedc73f6b747dd (patch) | |
tree | 5405d300a44d0f2c76ee0b0a17691dbe0fcbca58 | |
parent | 6ce4eac1f600b34f2f7f58f9cd8f0503d79e42ae (diff) | |
download | linux-160a061301c7adf54c40696e7ceedc73f6b747dd.tar.xz |
spi/qspi: set correct platform drvdata in ti_qspi_probe()
The ti_qspi_remove() use the platform drvdata as a type of
struct ti_qspi, we should pass correct platform drvdata to
platform_set_drvdata() in ti_qspi_probe().
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | drivers/spi/spi-ti-qspi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c index 0b71270fbf67..e147ed42e1fc 100644 --- a/drivers/spi/spi-ti-qspi.c +++ b/drivers/spi/spi-ti-qspi.c @@ -459,11 +459,10 @@ static int ti_qspi_probe(struct platform_device *pdev) if (!of_property_read_u32(np, "num-cs", &num_cs)) master->num_chipselect = num_cs; - platform_set_drvdata(pdev, master); - qspi = spi_master_get_devdata(master); qspi->master = master; qspi->dev = &pdev->dev; + platform_set_drvdata(pdev, qspi); r = platform_get_resource(pdev, IORESOURCE_MEM, 0); |