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: tegra-kbc - 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-27-jic23@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Jonathan Cameron and committed by
Dmitry Torokhov
995765ed bf7aa12b

+3 -4
+3 -4
drivers/input/keyboard/tegra-kbc.c
··· 713 713 return 0; 714 714 } 715 715 716 - #ifdef CONFIG_PM_SLEEP 717 716 static void tegra_kbc_set_keypress_interrupt(struct tegra_kbc *kbc, bool enable) 718 717 { 719 718 u32 val; ··· 801 802 802 803 return err; 803 804 } 804 - #endif 805 805 806 - static SIMPLE_DEV_PM_OPS(tegra_kbc_pm_ops, tegra_kbc_suspend, tegra_kbc_resume); 806 + static DEFINE_SIMPLE_DEV_PM_OPS(tegra_kbc_pm_ops, 807 + tegra_kbc_suspend, tegra_kbc_resume); 807 808 808 809 static struct platform_driver tegra_kbc_driver = { 809 810 .probe = tegra_kbc_probe, 810 811 .driver = { 811 812 .name = "tegra-kbc", 812 - .pm = &tegra_kbc_pm_ops, 813 + .pm = pm_sleep_ptr(&tegra_kbc_pm_ops), 813 814 .of_match_table = tegra_kbc_of_match, 814 815 }, 815 816 };