spi: fsl-lpspi: Fix problematic dev_set_drvdata call
authorAxel Lin <axel.lin@ingics.com>
Sun, 7 Apr 2019 14:58:15 +0000 (22:58 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 8 Apr 2019 07:07:30 +0000 (14:07 +0700)
commit6599be346daf9250b9fddfdea30a1d4779538730
tree1854033243dd305a6cc7745661633bb4973b3dc6
parent9d8371e287b9bd8f5b28386e6d7e8e9514a40aad
spi: fsl-lpspi: Fix problematic dev_set_drvdata call

The original code already set controller as drvdata:
platform_set_drvdata(pdev, controller);

But commit 944c01a889d9 ("spi: lpspi: enable runtime pm for lpspi")
added dev_set_drvdata(&pdev->dev, fsl_lpspi);
so fsl_lpspi_remove() will get wrong pointer by platform_get_drvdata().

Fixes: 944c01a889d9 ("spi: lpspi: enable runtime pm for lpspi")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-fsl-lpspi.c