Skip to content

Commit 86a1010

Browse files
martin-kaiserhdeller
authored andcommitted
fbdev: imxfb: switch to DEFINE_SIMPLE_DEV_PM_OPS
SIMPLE_DEV_PM_OPS is deprecated, replace it with DEFINE_SIMPLE_DEV_PM_OPS and use pm_sleep_ptr for setting the driver's pm routines. We can now remove the __maybe_unused qualifier in the suspend and resume functions. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Signed-off-by: Helge Deller <deller@gmx.de>
1 parent 4e47382 commit 86a1010

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

drivers/video/fbdev/imxfb.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,7 +1066,7 @@ static void imxfb_remove(struct platform_device *pdev)
10661066
framebuffer_release(info);
10671067
}
10681068

1069-
static int __maybe_unused imxfb_suspend(struct device *dev)
1069+
static int imxfb_suspend(struct device *dev)
10701070
{
10711071
struct fb_info *info = dev_get_drvdata(dev);
10721072
struct imxfb_info *fbi = info->par;
@@ -1076,7 +1076,7 @@ static int __maybe_unused imxfb_suspend(struct device *dev)
10761076
return 0;
10771077
}
10781078

1079-
static int __maybe_unused imxfb_resume(struct device *dev)
1079+
static int imxfb_resume(struct device *dev)
10801080
{
10811081
struct fb_info *info = dev_get_drvdata(dev);
10821082
struct imxfb_info *fbi = info->par;
@@ -1086,13 +1086,13 @@ static int __maybe_unused imxfb_resume(struct device *dev)
10861086
return 0;
10871087
}
10881088

1089-
static SIMPLE_DEV_PM_OPS(imxfb_pm_ops, imxfb_suspend, imxfb_resume);
1089+
static DEFINE_SIMPLE_DEV_PM_OPS(imxfb_pm_ops, imxfb_suspend, imxfb_resume);
10901090

10911091
static struct platform_driver imxfb_driver = {
10921092
.driver = {
10931093
.name = DRIVER_NAME,
10941094
.of_match_table = imxfb_of_dev_id,
1095-
.pm = &imxfb_pm_ops,
1095+
.pm = pm_sleep_ptr(&imxfb_pm_ops),
10961096
},
10971097
.probe = imxfb_probe,
10981098
.remove_new = imxfb_remove,

0 commit comments

Comments
 (0)