]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9858d10b07a5c42c2ac2bd33c2d4b01c5349b565
tree1854033243dd305a6cc7745661633bb4973b3dc6
parent635ea03e1cfa4382654c5be9d1558f4f28a5838b
spi: fsl-lpspi: Fix problematic dev_set_drvdata call

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

But commit f108a5cd3c6b ("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: f108a5cd3c6b ("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