mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Input: cyttsp5 - convert to DEFINE_SIMPLE_DEV_PM_OPS
@ 2026-10-01 17:53 Diederik de Haas
  2026-10-02  4:29 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Diederik de Haas @ 2026-10-01 17:53 UTC (permalink / raw)
  To: Linus Walleij, Dmitry Torokhov
  Cc: linux-input, linux-kernel, Diederik de Haas

The use of SIMPLE_DEV_PM_OPS got deprecated in commit
1a3c7bb08826 ("PM: core: Add new *_PM_OPS macros, deprecate old ones")

So convert the pm ops to use its replacement: DEFINE_SIMPLE_DEV_PM_OPS.
This also allows us to drop the __maybe_unused attributes.

Signed-off-by: Diederik de Haas <diederik@cknow-tech.com>
---
 drivers/input/touchscreen/cyttsp5.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/input/touchscreen/cyttsp5.c b/drivers/input/touchscreen/cyttsp5.c
index 9266c07314be..7b0613156fc1 100644
--- a/drivers/input/touchscreen/cyttsp5.c
+++ b/drivers/input/touchscreen/cyttsp5.c
@@ -942,7 +942,7 @@ static const struct i2c_device_id cyttsp5_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, cyttsp5_i2c_id);
 
-static int __maybe_unused cyttsp5_suspend(struct device *dev)
+static int cyttsp5_suspend(struct device *dev)
 {
 	struct cyttsp5 *ts = dev_get_drvdata(dev);
 
@@ -952,7 +952,7 @@ static int __maybe_unused cyttsp5_suspend(struct device *dev)
 	return 0;
 }
 
-static int __maybe_unused cyttsp5_resume(struct device *dev)
+static int cyttsp5_resume(struct device *dev)
 {
 	struct cyttsp5 *ts = dev_get_drvdata(dev);
 
@@ -962,13 +962,13 @@ static int __maybe_unused cyttsp5_resume(struct device *dev)
 	return 0;
 }
 
-static SIMPLE_DEV_PM_OPS(cyttsp5_pm, cyttsp5_suspend, cyttsp5_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(cyttsp5_pm, cyttsp5_suspend, cyttsp5_resume);
 
 static struct i2c_driver cyttsp5_i2c_driver = {
 	.driver = {
 		.name = CYTTSP5_NAME,
 		.of_match_table = cyttsp5_of_match,
-		.pm = &cyttsp5_pm,
+		.pm = pm_sleep_ptr(&cyttsp5_pm),
 	},
 	.probe = cyttsp5_i2c_probe,
 	.id_table = cyttsp5_i2c_id,
-- 
2.55.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Input: cyttsp5 - convert to DEFINE_SIMPLE_DEV_PM_OPS
  2026-10-01 17:53 [PATCH] Input: cyttsp5 - convert to DEFINE_SIMPLE_DEV_PM_OPS Diederik de Haas
@ 2026-10-02  4:29 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2026-10-02  4:29 UTC (permalink / raw)
  To: Diederik de Haas; +Cc: Linus Walleij, linux-input, linux-kernel

On Thu, Oct 01, 2026 at 07:53:18PM +0200, Diederik de Haas wrote:
> The use of SIMPLE_DEV_PM_OPS got deprecated in commit
> 1a3c7bb08826 ("PM: core: Add new *_PM_OPS macros, deprecate old ones")
> 
> So convert the pm ops to use its replacement: DEFINE_SIMPLE_DEV_PM_OPS.
> This also allows us to drop the __maybe_unused attributes.
> 
> Signed-off-by: Diederik de Haas <diederik@cknow-tech.com>

Applied, thank you.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-02  4:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-01 17:53 [PATCH] Input: cyttsp5 - convert to DEFINE_SIMPLE_DEV_PM_OPS Diederik de Haas
2026-10-02  4:29 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®