spi: npcm-pspi: Fix wrong priv pointer
Subsystems (2)
PATCH 1/1 spi: npcm-pspi: Fix wrong priv pointer
In npcm_pspi_probe(), current code set platform_set_drvdata(pdev, master); so in npcm_pspi_remove() platform_get_drvdata(pdev) will return pointer to master rather than priv. Fix it.
--- drivers/spi/spi-npcm-pspi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/spi/spi-npcm-pspi.c +2 -1
@@ -465,7 +465,8 @@ static int npcm_pspi_probe(struct platform_device *pdev)static int npcm_pspi_remove (struct platform_device *pdev) { -struct npcm_pspi *priv =platform_get_drvdata (pdev); +struct spi_master *master =platform_get_drvdata (pdev); +struct npcm_pspi *priv =spi_master_get_devdata (master);npcm_pspi_reset_hw (priv);clk_disable_unprepare (priv->clk);
Signature · 1 line
2.17.1
Mark Brown
maintainerApplied "spi: npcm-pspi: Fix wrong priv pointer" to the spi tree
The patch
spi: npcm-pspi: Fix wrong priv pointer
has been applied to the spi tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
From 082531444e454bac6f743ec064203bf8812bc9ac Mon Sep 17 00:00:00 2001
From: Axel Lin <[email protected]>
Date: Tue, 1 Jan 2019 22:10:53 +0800
Subject: [PATCH] spi: npcm-pspi: Fix wrong priv pointer
In npcm_pspi_probe(), current code set platform_set_drvdata(pdev, master); so in npcm_pspi_remove() platform_get_drvdata(pdev) will return pointer to master rather than priv. Fix it.
--- drivers/spi/spi-npcm-pspi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/spi/spi-npcm-pspi.c +2 -1
@@ -465,7 +465,8 @@ static int npcm_pspi_probe(struct platform_device *pdev)static int npcm_pspi_remove (struct platform_device *pdev) { -struct npcm_pspi *priv =platform_get_drvdata (pdev); +struct spi_master *master =platform_get_drvdata (pdev); +struct npcm_pspi *priv =spi_master_get_devdata (master);npcm_pspi_reset_hw (priv);clk_disable_unprepare (priv->clk);
Signature · 1 line
2.20.1