public inbox for linux-input@vger.kernel.org
 help / color / mirror / Atom feed
From: Bastien Nocera <hadess@hadess.net>
To: linux-input@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	Bastien Nocera <hadess@hadess.net>
Subject: [PATCH v2 08/11] HID: hid-sensor-hub: Use pm_ptr instead of #ifdef CONFIG_PM
Date: Tue, 13 Jan 2026 10:24:56 +0100	[thread overview]
Message-ID: <20260113092546.265734-9-hadess@hadess.net> (raw)
In-Reply-To: <20260113092546.265734-1-hadess@hadess.net>

This increases build coverage and allows to drop an #ifdef.

Signed-off-by: Bastien Nocera <hadess@hadess.net>
---
 drivers/hid/hid-sensor-hub.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c
index 4c94c03cb573..0edec902be41 100644
--- a/drivers/hid/hid-sensor-hub.c
+++ b/drivers/hid/hid-sensor-hub.c
@@ -422,7 +422,6 @@ int sensor_hub_input_get_attribute_info(struct hid_sensor_hub_device *hsdev,
 }
 EXPORT_SYMBOL_GPL(sensor_hub_input_get_attribute_info);
 
-#ifdef CONFIG_PM
 static int sensor_hub_suspend(struct hid_device *hdev, pm_message_t message)
 {
 	struct sensor_hub_data *pdata = hid_get_drvdata(hdev);
@@ -463,7 +462,6 @@ static int sensor_hub_reset_resume(struct hid_device *hdev)
 {
 	return 0;
 }
-#endif
 
 /*
  * Handle raw report as sent by device
@@ -772,11 +770,9 @@ static struct hid_driver sensor_hub_driver = {
 	.remove = sensor_hub_remove,
 	.raw_event = sensor_hub_raw_event,
 	.report_fixup = sensor_hub_report_fixup,
-#ifdef CONFIG_PM
-	.suspend = sensor_hub_suspend,
-	.resume = sensor_hub_resume,
-	.reset_resume = sensor_hub_reset_resume,
-#endif
+	.suspend = pm_ptr(sensor_hub_suspend),
+	.resume = pm_ptr(sensor_hub_resume),
+	.reset_resume = pm_ptr(sensor_hub_reset_resume),
 };
 module_hid_driver(sensor_hub_driver);
 
-- 
2.52.0


  parent reply	other threads:[~2026-01-13  9:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-13  9:24 [PATCH v2 00/11] HID: Use pm_*ptr instead of #ifdef CONFIG_PM* Bastien Nocera
2026-01-13  9:24 ` [PATCH v2 01/11] HID: hid-alps: Use pm_ptr instead of #ifdef CONFIG_PM Bastien Nocera
2026-01-13  9:24 ` [PATCH v2 02/11] HID: appletb-kbd: " Bastien Nocera
2026-01-13  9:24 ` [PATCH v2 03/11] HID: asus: " Bastien Nocera
2026-01-13  9:24 ` [PATCH v2 04/11] HID: lenovo: " Bastien Nocera
2026-01-13  9:24 ` [PATCH v2 05/11] HID: logitech-dj: " Bastien Nocera
2026-01-13  9:24 ` [PATCH v2 06/11] HID: nintendo: " Bastien Nocera
2026-01-13  9:24 ` [PATCH v2 07/11] HID: picolcd_core: " Bastien Nocera
2026-01-13  9:24 ` Bastien Nocera [this message]
2026-01-13  9:24 ` [PATCH v2 09/11] HID: uclogic: " Bastien Nocera
2026-01-13  9:24 ` [PATCH v2 10/11] HID: wacom: " Bastien Nocera
2026-01-13  9:24 ` [PATCH v2 11/11] HID: sony: " Bastien Nocera
2026-01-21 14:00 ` [PATCH v2 00/11] HID: Use pm_*ptr instead of #ifdef CONFIG_PM* Jiri Kosina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260113092546.265734-9-hadess@hadess.net \
    --to=hadess@hadess.net \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox