Skip to content

Commit

Permalink
spi/qspi: set correct platform drvdata in ti_qspi_probe()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Mark Brown committed Nov 24, 2013
1 parent 6ce4eac commit 160a061
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/spi/spi-ti-qspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 160a061

Please sign in to comment.