public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Bastien Nocera <hadess@hadess.net>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 1/3] Bluetooth: btmtksdio: Simplify dev_pm_ops usage
Date: Fri, 16 Jan 2026 13:50:42 +0100	[thread overview]
Message-ID: <20260116125803.598552-2-hadess@hadess.net> (raw)
In-Reply-To: <20260116125803.598552-1-hadess@hadess.net>

This increases build coverage and allows to drop a few #ifdef's.

Signed-off-by: Bastien Nocera <hadess@hadess.net>
---
 drivers/bluetooth/btmtksdio.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/bluetooth/btmtksdio.c b/drivers/bluetooth/btmtksdio.c
index fba3ab6d30a5..ec17521d5b9f 100644
--- a/drivers/bluetooth/btmtksdio.c
+++ b/drivers/bluetooth/btmtksdio.c
@@ -1472,7 +1472,6 @@ static void btmtksdio_remove(struct sdio_func *func)
 	hci_free_dev(hdev);
 }
 
-#ifdef CONFIG_PM
 static int btmtksdio_runtime_suspend(struct device *dev)
 {
 	struct sdio_func *func = dev_to_sdio_func(dev);
@@ -1538,22 +1537,17 @@ static int btmtksdio_system_resume(struct device *dev)
 }
 
 static const struct dev_pm_ops btmtksdio_pm_ops = {
-	SYSTEM_SLEEP_PM_OPS(btmtksdio_system_suspend, btmtksdio_system_resume)
-	RUNTIME_PM_OPS(btmtksdio_runtime_suspend, btmtksdio_runtime_resume, NULL)
+	SET_SYSTEM_SLEEP_PM_OPS(btmtksdio_system_suspend, btmtksdio_system_resume)
+	SET_RUNTIME_PM_OPS(btmtksdio_runtime_suspend, btmtksdio_runtime_resume, NULL)
 };
 
-#define BTMTKSDIO_PM_OPS (&btmtksdio_pm_ops)
-#else	/* CONFIG_PM */
-#define BTMTKSDIO_PM_OPS NULL
-#endif	/* CONFIG_PM */
-
 static struct sdio_driver btmtksdio_driver = {
 	.name		= "btmtksdio",
 	.probe		= btmtksdio_probe,
 	.remove		= btmtksdio_remove,
 	.id_table	= btmtksdio_table,
 	.drv = {
-		.pm = BTMTKSDIO_PM_OPS,
+		.pm = &btmtksdio_pm_ops,
 	}
 };
 
-- 
2.52.0


  reply	other threads:[~2026-01-16 12:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-16 12:50 [PATCH 0/3] More CONFIG_PM* simplifications Bastien Nocera
2026-01-16 12:50 ` Bastien Nocera [this message]
2026-01-16 13:33   ` [PATCH 1/3] Bluetooth: btmtksdio: Simplify dev_pm_ops usage Paul Menzel
2026-01-16 13:42     ` Bastien Nocera
2026-01-16 13:36   ` More CONFIG_PM* simplifications bluez.test.bot
2026-01-16 19:29   ` [PATCH 1/3] Bluetooth: btmtksdio: Simplify dev_pm_ops usage kernel test robot
2026-01-16 12:50 ` [PATCH 2/3] Bluetooth: btnxpuart: Remove unneeded CONFIG_PM ifdef Bastien Nocera
2026-01-16 13:35   ` Paul Menzel
2026-01-16 14:35   ` Luiz Augusto von Dentz
2026-01-16 14:41     ` Bastien Nocera
2026-01-16 19:50   ` kernel test robot
2026-01-19  7:53     ` Neeraj Sanjay Kale
2026-01-19  9:10       ` Bastien Nocera
2026-01-20 16:42         ` Luiz Augusto von Dentz
2026-01-20 17:17           ` Bastien Nocera
2026-01-20 18:05             ` Luiz Augusto von Dentz
2026-01-20 21:38               ` Bastien Nocera
2026-01-16 12:50 ` [PATCH 3/3] Bluetooth: btintel: Remove unneeded CONFIG_PM* #ifdef's Bastien Nocera
2026-01-16 13:36   ` Paul Menzel
2026-01-16 21:49   ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260116125803.598552-2-hadess@hadess.net \
    --to=hadess@hadess.net \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox