spi: uniphier: Fix a bug that doesn't point to private data correctly
authorKunihiko Hayashi <hayashi.kunihiko@socionext.com>
Wed, 22 Dec 2021 04:48:12 +0000 (13:48 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:05:08 +0000 (11:05 +0100)
commit0d9b780cb385cc4f7d2f86a575656837030dc9a9
tree9bfd6c3bcd1315cb89bf44dd0b8b65df6c664f9f
parente53802534cd25fc1dd6a5391aa9f686f6c73dc2a
spi: uniphier: Fix a bug that doesn't point to private data correctly

commit 80bb73a9fbcde4ecc55e12f10c73fabbe68a24d1 upstream.

In uniphier_spi_remove(), there is a wrong code to get private data from
the platform device, so the driver can't be removed properly.

The driver should get spi_master from the platform device and retrieve
the private data from it.

Cc: <stable@vger.kernel.org>
Fixes: 5ba155a4d4cc ("spi: add SPI controller driver for UniPhier SoC")
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Link: https://lore.kernel.org/r/1640148492-32178-1-git-send-email-hayashi.kunihiko@socionext.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/spi/spi-uniphier.c