]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Bluetooth: btusb: Use pm_ptr instead of #ifdef CONFIG_PM
authorBastien Nocera <hadess@hadess.net>
Mon, 12 Jan 2026 10:51:13 +0000 (11:51 +0100)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 29 Jan 2026 18:32:27 +0000 (13:32 -0500)
This increases build coverage and allows to drop an #ifdef.

Signed-off-by: Bastien Nocera <hadess@hadess.net>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
drivers/bluetooth/btusb.c

index de9e484efef711c364d6601a5f3a41ed3c13454a..b16eb9d70dcf9875645a0ce02056371bbf8eeaec 100644 (file)
@@ -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,