mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 12:40:53 +07:00
spi: simplify getting .drvdata
We should get drvdata 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> Acked-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
7956fadd40
commit
e1f16b0493
@ -686,8 +686,7 @@ static int cdns_spi_remove(struct platform_device *pdev)
|
|||||||
*/
|
*/
|
||||||
static int __maybe_unused cdns_spi_suspend(struct device *dev)
|
static int __maybe_unused cdns_spi_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct spi_master *master = dev_get_drvdata(dev);
|
||||||
struct spi_master *master = platform_get_drvdata(pdev);
|
|
||||||
|
|
||||||
return spi_master_suspend(master);
|
return spi_master_suspend(master);
|
||||||
}
|
}
|
||||||
@ -702,8 +701,7 @@ static int __maybe_unused cdns_spi_suspend(struct device *dev)
|
|||||||
*/
|
*/
|
||||||
static int __maybe_unused cdns_spi_resume(struct device *dev)
|
static int __maybe_unused cdns_spi_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct spi_master *master = dev_get_drvdata(dev);
|
||||||
struct spi_master *master = platform_get_drvdata(pdev);
|
|
||||||
struct cdns_spi *xspi = spi_master_get_devdata(master);
|
struct cdns_spi *xspi = spi_master_get_devdata(master);
|
||||||
|
|
||||||
cdns_spi_init_hw(xspi);
|
cdns_spi_init_hw(xspi);
|
||||||
|
@ -906,8 +906,7 @@ static int zynqmp_qspi_start_transfer(struct spi_master *master,
|
|||||||
*/
|
*/
|
||||||
static int __maybe_unused zynqmp_qspi_suspend(struct device *dev)
|
static int __maybe_unused zynqmp_qspi_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct spi_master *master = dev_get_drvdata(dev);
|
||||||
struct spi_master *master = platform_get_drvdata(pdev);
|
|
||||||
|
|
||||||
spi_master_suspend(master);
|
spi_master_suspend(master);
|
||||||
|
|
||||||
@ -927,8 +926,7 @@ static int __maybe_unused zynqmp_qspi_suspend(struct device *dev)
|
|||||||
*/
|
*/
|
||||||
static int __maybe_unused zynqmp_qspi_resume(struct device *dev)
|
static int __maybe_unused zynqmp_qspi_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
struct platform_device *pdev = to_platform_device(dev);
|
struct spi_master *master = dev_get_drvdata(dev);
|
||||||
struct spi_master *master = platform_get_drvdata(pdev);
|
|
||||||
struct zynqmp_qspi *xqspi = spi_master_get_devdata(master);
|
struct zynqmp_qspi *xqspi = spi_master_get_devdata(master);
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user