drivers: rkflash: sfc: use dev_pm_ops instead of legacy callback

Change-Id: Ic9694d9ca0cb94f8b6fab3115f64dfc83dde2ee8
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
This commit is contained in:
Ziyuan Xu
2019-03-20 11:41:39 +08:00
committed by Tao Huang
parent fa43242189
commit ee597d107d

View File

@@ -154,16 +154,20 @@ static int rksfc_probe(struct platform_device *pdev)
return ret;
}
static int rksfc_suspend(struct platform_device *pdev, pm_message_t state)
static int __maybe_unused rksfc_suspend(struct device *dev)
{
return rkflash_dev_suspend();
}
static int rksfc_resume(struct platform_device *pdev)
static int __maybe_unused rksfc_resume(struct device *dev)
{
return rkflash_dev_resume(g_sfc_info.reg_base);
}
static SIMPLE_DEV_PM_OPS(rksfc_pmops,
rksfc_suspend,
rksfc_resume);
static void rksfc_shutdown(struct platform_device *pdev)
{
rkflash_dev_shutdown();
@@ -178,14 +182,13 @@ static const struct of_device_id of_rksfc_match[] = {
static struct platform_driver rksfc_driver = {
.probe = rksfc_probe,
.suspend = rksfc_suspend,
.resume = rksfc_resume,
.shutdown = rksfc_shutdown,
.driver = {
.name = "rksfc",
#ifdef CONFIG_OF
.of_match_table = of_rksfc_match,
#endif
.pm = &rksfc_pmops,
},
};