Thread (12 messages) 12 messages, 4 authors, 2023-02-15

[PATCH v2 3/5] Bluetooth: hci_mrvl: use maybe_unused macro for device tree ids

flat view
STALE1340d SUPERSEDED

From: Francesco Dolcini <francesco@dolcini.it>
Date: 2023-01-26 07:45:31
Also in: linux-bluetooth, lkml
Subsystem: bluetooth drivers, the rest · Maintainers: Marcel Holtmann, Luiz Augusto von Dentz, Linus Torvalds

Revision v2 of 3 in this series.

Revisions (3)
  1. v1 [diff vs current]
  2. v2 current
  3. v3 [diff vs current]
From: Stefan Eichenberger <redacted>

Use the maybe_unused macro for the device tree ids instead of #ifdef
CONFIG_OF. This makes it easier to add support for new devices.

Signed-off-by: Stefan Eichenberger <redacted>
Signed-off-by: Francesco Dolcini <redacted>
---
v2: new patch
---
 drivers/bluetooth/hci_mrvl.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/bluetooth/hci_mrvl.c b/drivers/bluetooth/hci_mrvl.c
index fbc3f7c3a5c7..eaa9c51cacfa 100644
--- a/drivers/bluetooth/hci_mrvl.c
+++ b/drivers/bluetooth/hci_mrvl.c
@@ -414,13 +414,11 @@ static void mrvl_serdev_remove(struct serdev_device *serdev)
 	hci_uart_unregister_device(&mrvldev->hu);
 }
 
-#ifdef CONFIG_OF
-static const struct of_device_id mrvl_bluetooth_of_match[] = {
+static const struct of_device_id __maybe_unused mrvl_bluetooth_of_match[] = {
 	{ .compatible = "mrvl,88w8897" },
 	{ },
 };
 MODULE_DEVICE_TABLE(of, mrvl_bluetooth_of_match);
-#endif
 
 static struct serdev_device_driver mrvl_serdev_driver = {
 	.probe = mrvl_serdev_probe,
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help