[PATCH 1/2] nfc: fdp: Use str_yes_no() helper

Qianfeng Rong posted 2 patches 3 months, 3 weeks ago
[PATCH 1/2] nfc: fdp: Use str_yes_no() helper
Posted by Qianfeng Rong 3 months, 3 weeks ago
Remove hard-coded strings by using the str_yes_no() helper
function.

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
---
 drivers/nfc/fdp/i2c.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/nfc/fdp/i2c.c b/drivers/nfc/fdp/i2c.c
index c1896a1d978c..a7c65e9bb5a2 100644
--- a/drivers/nfc/fdp/i2c.c
+++ b/drivers/nfc/fdp/i2c.c
@@ -12,6 +12,7 @@
 #include <linux/nfc.h>
 #include <linux/delay.h>
 #include <linux/gpio/consumer.h>
+#include <linux/string_choices.h>
 #include <net/nfc/nfc.h>
 #include <net/nfc/nci_core.h>
 
@@ -265,7 +266,7 @@ static void fdp_nci_i2c_read_device_properties(struct device *dev,
 
 alloc_err:
 	dev_dbg(dev, "Clock type: %d, clock frequency: %d, VSC: %s",
-		*clock_type, *clock_freq, *fw_vsc_cfg != NULL ? "yes" : "no");
+		*clock_type, *clock_freq, str_yes_no(*fw_vsc_cfg != NULL));
 }
 
 static const struct acpi_gpio_params power_gpios = { 0, 0, false };
-- 
2.34.1