From: Bastien Nocera Date: Tue, 13 Jan 2026 09:24:56 +0000 (+0100) Subject: HID: hid-sensor-hub: Use pm_ptr instead of #ifdef CONFIG_PM X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3e5bcffda372bea49555fef4e311687bed439bc;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c index 4c94c03cb5739..0edec902be418 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);