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: stmfts - switch to SYSTEM_SLEEP_/RUNTIME_PM_OPS() and pm_ptr()

SET_SYSTEM_SLEEP_PM_OPS() and SET_RUNTIME_PM_OPS() are deprecated as
they require explicit protection against unused function warnings.
The new combination of pm_ptr() and SYSTEM_SLEEP_PM_OPS()/
RUNTIME_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 __maybe_unused markings.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Andi Shyti <andi@etezian.org>
Link: https://lore.kernel.org/r/20230114171620.42891-7-jic23@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Jonathan Cameron and committed by
Dmitry Torokhov
90208b31 452fcd2d

+7 -7
+7 -7
drivers/input/touchscreen/stmfts.c
··· 742 742 pm_runtime_disable(&client->dev); 743 743 } 744 744 745 - static int __maybe_unused stmfts_runtime_suspend(struct device *dev) 745 + static int stmfts_runtime_suspend(struct device *dev) 746 746 { 747 747 struct stmfts_data *sdata = dev_get_drvdata(dev); 748 748 int ret; ··· 754 754 return ret; 755 755 } 756 756 757 - static int __maybe_unused stmfts_runtime_resume(struct device *dev) 757 + static int stmfts_runtime_resume(struct device *dev) 758 758 { 759 759 struct stmfts_data *sdata = dev_get_drvdata(dev); 760 760 int ret; ··· 766 766 return ret; 767 767 } 768 768 769 - static int __maybe_unused stmfts_suspend(struct device *dev) 769 + static int stmfts_suspend(struct device *dev) 770 770 { 771 771 struct stmfts_data *sdata = dev_get_drvdata(dev); 772 772 ··· 775 775 return 0; 776 776 } 777 777 778 - static int __maybe_unused stmfts_resume(struct device *dev) 778 + static int stmfts_resume(struct device *dev) 779 779 { 780 780 struct stmfts_data *sdata = dev_get_drvdata(dev); 781 781 ··· 783 783 } 784 784 785 785 static const struct dev_pm_ops stmfts_pm_ops = { 786 - SET_SYSTEM_SLEEP_PM_OPS(stmfts_suspend, stmfts_resume) 787 - SET_RUNTIME_PM_OPS(stmfts_runtime_suspend, stmfts_runtime_resume, NULL) 786 + SYSTEM_SLEEP_PM_OPS(stmfts_suspend, stmfts_resume) 787 + RUNTIME_PM_OPS(stmfts_runtime_suspend, stmfts_runtime_resume, NULL) 788 788 }; 789 789 790 790 #ifdef CONFIG_OF ··· 805 805 .driver = { 806 806 .name = STMFTS_DEV_NAME, 807 807 .of_match_table = of_match_ptr(stmfts_of_match), 808 - .pm = &stmfts_pm_ops, 808 + .pm = pm_ptr(&stmfts_pm_ops), 809 809 .probe_type = PROBE_PREFER_ASYNCHRONOUS, 810 810 }, 811 811 .probe_new = stmfts_probe,