[PATCH] Bluetooth: hci_bcm: use str_low_high() helper instead of ternary operator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Replace the ternary operator: 'dev->irq_active_low ? "low" : "high"'
with the str_low_high() helper function. This enhances code readability
and maintains consistency.

Signed-off-by: Nai-Chen Cheng <bleach1827@xxxxxxxxx>
---
 drivers/bluetooth/hci_bcm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
index f96617b85d8777972137ca146ab99a3d8da12584..65740b86c49c42b65a67cbd892daec2358a09394 100644
--- a/drivers/bluetooth/hci_bcm.c
+++ b/drivers/bluetooth/hci_bcm.c
@@ -26,6 +26,7 @@
 #include <linux/dmi.h>
 #include <linux/pm_runtime.h>
 #include <linux/serdev.h>
+#include <linux/string_choices.h>
 
 #include <net/bluetooth/bluetooth.h>
 #include <net/bluetooth/hci_core.h>
@@ -1213,7 +1214,7 @@ static int bcm_acpi_probe(struct bcm_device *dev)
 	if (irq_polarity != -1) {
 		dev->irq_active_low = irq_polarity;
 		dev_warn(dev->dev, "Overwriting IRQ polarity to active %s by module-param\n",
-			 dev->irq_active_low ? "low" : "high");
+			 str_low_high(dev->irq_active_low));
 	}
 
 	return 0;

---
base-commit: f83a4f2a4d8c485922fba3018a64fc8f4cfd315f
change-id: 20250914-bluetooth-hci_bcm-string-choice-helper-aae05c9c18b2

Best regards,
-- 
Nai-Chen Cheng <bleach1827@xxxxxxxxx>





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux