Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit f457cb70 authored by Wolfram Sang's avatar Wolfram Sang Committed by Mark Brown
Browse files

spi: mxic: simplify getting .driver_data



We should get 'driver_data' from 'struct device' directly. Going via
platform_device is an unneeded step back and forth.

Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 43a8d240
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -492,8 +492,7 @@ static int mxic_spi_transfer_one(struct spi_master *master,

static int __maybe_unused mxic_spi_runtime_suspend(struct device *dev)
{
	struct platform_device *pdev = to_platform_device(dev);
	struct spi_master *master = platform_get_drvdata(pdev);
	struct spi_master *master = dev_get_drvdata(dev);
	struct mxic_spi *mxic = spi_master_get_devdata(master);

	mxic_spi_clk_disable(mxic);
@@ -504,8 +503,7 @@ static int __maybe_unused mxic_spi_runtime_suspend(struct device *dev)

static int __maybe_unused mxic_spi_runtime_resume(struct device *dev)
{
	struct platform_device *pdev = to_platform_device(dev);
	struct spi_master *master = platform_get_drvdata(pdev);
	struct spi_master *master = dev_get_drvdata(dev);
	struct mxic_spi *mxic = spi_master_get_devdata(master);
	int ret;