[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250619093426.121154-3-rongqianfeng@vivo.com>
Date: Thu, 19 Jun 2025 17:34:21 +0800
From: Qianfeng Rong <rongqianfeng@...o.com>
To: Krzysztof Kozlowski <krzk@...nel.org>,
Qianfeng Rong <rongqianfeng@...o.com>,
Uwe Kleine-König <u.kleine-koenig@...libre.com>,
Jakub Kicinski <kuba@...nel.org>,
Al Viro <viro@...iv.linux.org.uk>,
netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: opensource.kernel@...o.com
Subject: [PATCH 2/2] nfc: pn544: Use str_low_high() helper
Remove hard-coded strings by using the str_low_high() helper
function.
Signed-off-by: Qianfeng Rong <rongqianfeng@...o.com>
---
drivers/nfc/pn544/i2c.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/nfc/pn544/i2c.c b/drivers/nfc/pn544/i2c.c
index a0dfb3f98d5a..8fc9552b9d30 100644
--- a/drivers/nfc/pn544/i2c.c
+++ b/drivers/nfc/pn544/i2c.c
@@ -16,7 +16,7 @@
#include <linux/nfc.h>
#include <linux/firmware.h>
#include <linux/gpio/consumer.h>
-
+#include <linux/string_choices.h>
#include <linux/unaligned.h>
#include <net/nfc/hci.h>
@@ -212,7 +212,7 @@ static void pn544_hci_i2c_platform_init(struct pn544_i2c_phy *phy)
if (ret == count) {
nfc_info(&phy->i2c_dev->dev,
"nfc_en polarity : active %s\n",
- (polarity == 0 ? "low" : "high"));
+ str_low_high(polarity == 0));
goto out;
}
}
--
2.34.1
Powered by blists - more mailing lists