mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
spi: spi-sh-msiof: 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
2a35a643f1
commit
07c7df3ecd
1 changed files with 2 additions and 4 deletions
|
@ -1426,16 +1426,14 @@ MODULE_DEVICE_TABLE(platform, spi_driver_ids);
|
||||||
#ifdef CONFIG_PM_SLEEP
|
#ifdef CONFIG_PM_SLEEP
|
||||||
static int sh_msiof_spi_suspend(struct device *dev)
|
static int sh_msiof_spi_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct sh_msiof_spi_priv *p = dev_get_drvdata(dev);
|
||||||
struct sh_msiof_spi_priv *p = platform_get_drvdata(pdev);
|
|
||||||
|
|
||||||
return spi_master_suspend(p->master);
|
return spi_master_suspend(p->master);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sh_msiof_spi_resume(struct device *dev)
|
static int sh_msiof_spi_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct sh_msiof_spi_priv *p = dev_get_drvdata(dev);
|
||||||
struct sh_msiof_spi_priv *p = platform_get_drvdata(pdev);
|
|
||||||
|
|
||||||
return spi_master_resume(p->master);
|
return spi_master_resume(p->master);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue