Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fbdev: cyber2000fb: 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".

Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
Cc: Bjorn Helgaas <helgaas@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Bjorn Helgaas <bjorn@helgaas.com>
Cc: Vaibhav Gupta <vaibhav.varodek@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Andres Salomon <dilinger@queued.net>
CC: Antonino Daplas <adaplas@gmail.com>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200819185654.151170-9-vaibhavgupta40@gmail.com

authored by

Vaibhav Gupta and committed by
Bartlomiej Zolnierkiewicz
c62c0f57 a4ba7df5

+8 -5
+8 -5
drivers/video/fbdev/cyber2000fb.c
··· 1810 1810 } 1811 1811 } 1812 1812 1813 - static int cyberpro_pci_suspend(struct pci_dev *dev, pm_message_t state) 1813 + static int __maybe_unused cyberpro_pci_suspend(struct device *dev) 1814 1814 { 1815 1815 return 0; 1816 1816 } ··· 1818 1818 /* 1819 1819 * Re-initialise the CyberPro hardware 1820 1820 */ 1821 - static int cyberpro_pci_resume(struct pci_dev *dev) 1821 + static int __maybe_unused cyberpro_pci_resume(struct device *dev) 1822 1822 { 1823 - struct cfb_info *cfb = pci_get_drvdata(dev); 1823 + struct cfb_info *cfb = dev_get_drvdata(dev); 1824 1824 1825 1825 if (cfb) { 1826 1826 cyberpro_pci_enable_mmio(cfb); ··· 1846 1846 1847 1847 MODULE_DEVICE_TABLE(pci, cyberpro_pci_table); 1848 1848 1849 + static SIMPLE_DEV_PM_OPS(cyberpro_pci_pm_ops, 1850 + cyberpro_pci_suspend, 1851 + cyberpro_pci_resume); 1852 + 1849 1853 static struct pci_driver cyberpro_driver = { 1850 1854 .name = "CyberPro", 1851 1855 .probe = cyberpro_pci_probe, 1852 1856 .remove = cyberpro_pci_remove, 1853 - .suspend = cyberpro_pci_suspend, 1854 - .resume = cyberpro_pci_resume, 1857 + .driver.pm = &cyberpro_pci_pm_ops, 1855 1858 .id_table = cyberpro_pci_table 1856 1859 }; 1857 1860