From 56493c8166df7afff1da8f02bd7f6060df681f8b Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Mon, 12 Jan 2026 11:51:13 +0100 Subject: [PATCH] Bluetooth: btusb: Use pm_ptr instead of #ifdef CONFIG_PM This increases build coverage and allows to drop an #ifdef. Signed-off-by: Bastien Nocera Reviewed-by: Paul Menzel Signed-off-by: Luiz Augusto von Dentz --- drivers/bluetooth/btusb.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index de9e484efef7..b16eb9d70dcf 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -4466,7 +4466,6 @@ static void btusb_disconnect(struct usb_interface *intf) kfree(data); } -#ifdef CONFIG_PM static int btusb_suspend(struct usb_interface *intf, pm_message_t message) { struct btusb_data *data = usb_get_intfdata(intf); @@ -4620,7 +4619,6 @@ done: return err; } -#endif #ifdef CONFIG_DEV_COREDUMP static void btusb_coredump(struct device *dev) @@ -4637,10 +4635,8 @@ static struct usb_driver btusb_driver = { .name = "btusb", .probe = btusb_probe, .disconnect = btusb_disconnect, -#ifdef CONFIG_PM - .suspend = btusb_suspend, - .resume = btusb_resume, -#endif + .suspend = pm_ptr(btusb_suspend), + .resume = pm_ptr(btusb_resume), .id_table = btusb_table, .supports_autosuspend = 1, .disable_hub_initiated_lpm = 1, -- 2.47.3