diff options
| author | Bastien Nocera <hadess@hadess.net> | 2026-01-13 10:24:56 +0100 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.cz> | 2026-01-28 19:23:17 +0100 |
| commit | b3e5bcffda372bea49555fef4e311687bed439bc (patch) | |
| tree | b5e53ee87e234eea76075bfdc87483ad7ac5b319 /drivers/hid | |
| parent | c9b66161ccf8ef39e28f6852838b881b205c6759 (diff) | |
HID: hid-sensor-hub: Use pm_ptr instead of #ifdef CONFIG_PM
This increases build coverage and allows to drop an #ifdef.
Signed-off-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Diffstat (limited to 'drivers/hid')
| -rw-r--r-- | drivers/hid/hid-sensor-hub.c | 10 |
1 files 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); |
