public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] Bluetooth: btusb: Use pm_ptr instead of #ifdef CONFIG_PM
@ 2026-01-13  9:01 Bastien Nocera
  2026-01-13  9:25 ` [v2] " bluez.test.bot
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Bastien Nocera @ 2026-01-13  9:01 UTC (permalink / raw)
  To: linux-bluetooth

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

Signed-off-by: Bastien Nocera <hadess@hadess.net>
---
Changes since v1:
- Fixed build

 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 ded09e94d296..67ee2b869852 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -4462,7 +4462,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);
@@ -4616,7 +4615,6 @@ static int btusb_resume(struct usb_interface *intf)
 
 	return err;
 }
-#endif
 
 #ifdef CONFIG_DEV_COREDUMP
 static void btusb_coredump(struct device *dev)
@@ -4633,10 +4631,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.52.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-01-15 16:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-13  9:01 [PATCH v2] Bluetooth: btusb: Use pm_ptr instead of #ifdef CONFIG_PM Bastien Nocera
2026-01-13  9:25 ` [v2] " bluez.test.bot
2026-01-13  9:28 ` [PATCH v2] " Bastien Nocera
2026-01-15 16:29   ` Luiz Augusto von Dentz
2026-01-13  9:35 ` Paul Menzel
2026-01-15 16:30 ` patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox