diff --git a/drivers/spi/spi-tegra20-sflash.c b/drivers/spi/spi-tegra20-sflash.c index 2caa33f0a52c..2a5e3acea06b 100644 --- a/drivers/spi/spi-tegra20-sflash.c +++ b/drivers/spi/spi-tegra20-sflash.c @@ -533,7 +533,6 @@ static void tegra_sflash_remove(struct platform_device *pdev) tegra_sflash_runtime_suspend(&pdev->dev); } -#ifdef CONFIG_PM_SLEEP static int tegra_sflash_suspend(struct device *dev) { struct spi_controller *host = dev_get_drvdata(dev); @@ -557,7 +556,6 @@ static int tegra_sflash_resume(struct device *dev) return spi_controller_resume(host); } -#endif static int tegra_sflash_runtime_suspend(struct device *dev) { @@ -586,14 +584,14 @@ static int tegra_sflash_runtime_resume(struct device *dev) } static const struct dev_pm_ops slink_pm_ops = { - SET_RUNTIME_PM_OPS(tegra_sflash_runtime_suspend, - tegra_sflash_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(tegra_sflash_suspend, tegra_sflash_resume) + RUNTIME_PM_OPS(tegra_sflash_runtime_suspend, + tegra_sflash_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(tegra_sflash_suspend, tegra_sflash_resume) }; static struct platform_driver tegra_sflash_driver = { .driver = { .name = "spi-tegra-sflash", - .pm = &slink_pm_ops, + .pm = pm_ptr(&slink_pm_ops), .of_match_table = tegra_sflash_of_match, }, .probe = tegra_sflash_probe,