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

Configure Feed

Select the types of activity you want to include in your feed.

Input: pxa27x_keypad - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()

SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection
against unused function warnings. The new combination of pm_sleep_ptr()
and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions,
thus suppressing the warning, but still allowing the unused code to be
removed. Thus also drop the ifdef guards.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20221204180841.2211588-21-jic23@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Jonathan Cameron and committed by
Dmitry Torokhov
a4b4fa51 bb467888

+3 -5
+3 -5
drivers/input/keyboard/pxa27x_keypad.c
··· 660 660 clk_disable_unprepare(keypad->clk); 661 661 } 662 662 663 - #ifdef CONFIG_PM_SLEEP 664 663 static int pxa27x_keypad_suspend(struct device *dev) 665 664 { 666 665 struct platform_device *pdev = to_platform_device(dev); ··· 705 706 706 707 return ret; 707 708 } 708 - #endif 709 709 710 - static SIMPLE_DEV_PM_OPS(pxa27x_keypad_pm_ops, 711 - pxa27x_keypad_suspend, pxa27x_keypad_resume); 710 + static DEFINE_SIMPLE_DEV_PM_OPS(pxa27x_keypad_pm_ops, 711 + pxa27x_keypad_suspend, pxa27x_keypad_resume); 712 712 713 713 714 714 static int pxa27x_keypad_probe(struct platform_device *pdev) ··· 828 830 .driver = { 829 831 .name = "pxa27x-keypad", 830 832 .of_match_table = of_match_ptr(pxa27x_keypad_dt_match), 831 - .pm = &pxa27x_keypad_pm_ops, 833 + .pm = pm_sleep_ptr(&pxa27x_keypad_pm_ops), 832 834 }, 833 835 }; 834 836 module_platform_driver(pxa27x_keypad_driver);