From df7a9ec3bc12c6464491d3bee0e7983f48bc04e4 Mon Sep 17 00:00:00 2001 From: Vaibhav Gupta Date: Thu, 20 Aug 2020 00:26:44 +0530 Subject: fbdev: lxfb: use generic power management Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. This way we can remove the legacy .suspend & .resume bindings from "lxfb_driver". The lxfb_suspend() is designed to function only in the case of Suspend. Thus, the code was kept inside "if (state.event == PM_EVENT_SUSPEND)" container. This is because, in the legacy framework, this callback was invoked even in the event of Freeze and Hibernate. Hence, added the load of unnecessary function-calls. The goal can be achieved by binding the callback with only "lxfb_pm_ops.suspend" in the new framework. This also avoids the step of checking "if (state.event == PM_EVENT_SUSPEND)" every time the callback is invoked. Signed-off-by: Vaibhav Gupta Cc: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Vaibhav Gupta Cc: Sam Ravnborg Cc: Paul Mackerras Cc: Russell King Cc: Andres Salomon CC: Antonino Daplas Cc: Shuah Khan Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200819185654.151170-3-vaibhavgupta40@gmail.com --- drivers/video/fbdev/geode/lxfb_ops.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'drivers/video/fbdev/geode/lxfb_ops.c') diff --git a/drivers/video/fbdev/geode/lxfb_ops.c b/drivers/video/fbdev/geode/lxfb_ops.c index 5be8bc62844c..b3a041fce570 100644 --- a/drivers/video/fbdev/geode/lxfb_ops.c +++ b/drivers/video/fbdev/geode/lxfb_ops.c @@ -580,8 +580,6 @@ int lx_blank_display(struct fb_info *info, int blank_mode) return 0; } -#ifdef CONFIG_PM - static void lx_save_regs(struct lxfb_par *par) { uint32_t filt; @@ -837,5 +835,3 @@ int lx_powerup(struct fb_info *info) par->powered_down = 0; return 0; } - -#endif -- cgit v1.2.3