mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-10 07:50:04 +00:00
spi: spi-rspi: 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: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
6eee6d317a
commit
be0bf62e3d
@ -1347,16 +1347,14 @@ MODULE_DEVICE_TABLE(platform, spi_driver_ids);
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int rspi_suspend(struct device *dev)
|
||||
{
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
struct rspi_data *rspi = platform_get_drvdata(pdev);
|
||||
struct rspi_data *rspi = dev_get_drvdata(dev);
|
||||
|
||||
return spi_master_suspend(rspi->master);
|
||||
}
|
||||
|
||||
static int rspi_resume(struct device *dev)
|
||||
{
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
struct rspi_data *rspi = platform_get_drvdata(pdev);
|
||||
struct rspi_data *rspi = dev_get_drvdata(dev);
|
||||
|
||||
return spi_master_resume(rspi->master);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user