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: s6sy761 - 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: Caleb Connolly <caleb@connolly.tech>
Cc: Andi Shyti <andi@etezian.org>
Tested-by: Caleb Connolly <caleb@connolly.tech> # oneplus-guacamole
Link: https://lore.kernel.org/r/20230114171620.42891-5-jic23@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Jonathan Cameron and committed by
Dmitry Torokhov
e2eaf9e0 c51283d7

+7 -8
+7 -8
drivers/input/touchscreen/s6sy761.c
··· 479 479 pm_runtime_disable(&client->dev); 480 480 } 481 481 482 - static int __maybe_unused s6sy761_runtime_suspend(struct device *dev) 482 + static int s6sy761_runtime_suspend(struct device *dev) 483 483 { 484 484 struct s6sy761_data *sdata = dev_get_drvdata(dev); 485 485 ··· 487 487 S6SY761_APPLICATION_MODE, S6SY761_APP_SLEEP); 488 488 } 489 489 490 - static int __maybe_unused s6sy761_runtime_resume(struct device *dev) 490 + static int s6sy761_runtime_resume(struct device *dev) 491 491 { 492 492 struct s6sy761_data *sdata = dev_get_drvdata(dev); 493 493 ··· 495 495 S6SY761_APPLICATION_MODE, S6SY761_APP_NORMAL); 496 496 } 497 497 498 - static int __maybe_unused s6sy761_suspend(struct device *dev) 498 + static int s6sy761_suspend(struct device *dev) 499 499 { 500 500 struct s6sy761_data *sdata = dev_get_drvdata(dev); 501 501 ··· 504 504 return 0; 505 505 } 506 506 507 - static int __maybe_unused s6sy761_resume(struct device *dev) 507 + static int s6sy761_resume(struct device *dev) 508 508 { 509 509 struct s6sy761_data *sdata = dev_get_drvdata(dev); 510 510 ··· 514 514 } 515 515 516 516 static const struct dev_pm_ops s6sy761_pm_ops = { 517 - SET_SYSTEM_SLEEP_PM_OPS(s6sy761_suspend, s6sy761_resume) 518 - SET_RUNTIME_PM_OPS(s6sy761_runtime_suspend, 519 - s6sy761_runtime_resume, NULL) 517 + SYSTEM_SLEEP_PM_OPS(s6sy761_suspend, s6sy761_resume) 518 + RUNTIME_PM_OPS(s6sy761_runtime_suspend, s6sy761_runtime_resume, NULL) 520 519 }; 521 520 522 521 #ifdef CONFIG_OF ··· 536 537 .driver = { 537 538 .name = S6SY761_DEV_NAME, 538 539 .of_match_table = of_match_ptr(s6sy761_of_match), 539 - .pm = &s6sy761_pm_ops, 540 + .pm = pm_ptr(&s6sy761_pm_ops), 540 541 }, 541 542 .probe_new = s6sy761_probe, 542 543 .remove = s6sy761_remove,