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>
This commit is contained in:
Wei Yongjun 2013-11-11 14:13:41 +08:00 committed by Mark Brown
parent 6ce4eac1f6
commit 160a061301

View File

@ -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);