summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYumeng Fang <fang.yumeng@zte.com.cn>2025-06-23 20:31:44 +0800
committerAndi Shyti <andi.shyti@kernel.org>2025-07-24 00:37:59 +0200
commitbe3b425bcb65b1f5879752371131e813eaa2d481 (patch)
tree688c408f99b6c117547e6055e3d54770125e6460
parent8428582554c66de11d6f96074be91a53affdb66e (diff)
i2c: stm32f7: Use str_on_off() helper
Remove hard-coded strings by using the str_on_off() helper. Signed-off-by: Yumeng Fang <fang.yumeng@zte.com.cn> Acked-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org> Link: https://lore.kernel.org/r/20250623203144007kQF7E1Bhy5PJl-Ph3u3Ou@zte.com.cn
-rw-r--r--drivers/i2c/busses/i2c-stm32f7.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c
index 73a7b8894c0d..c8b4b404f6c1 100644
--- a/drivers/i2c/busses/i2c-stm32f7.c
+++ b/drivers/i2c/busses/i2c-stm32f7.c
@@ -34,6 +34,7 @@
#include <linux/regmap.h>
#include <linux/reset.h>
#include <linux/slab.h>
+#include <linux/string_choices.h>
#include "i2c-stm32.h"
@@ -722,7 +723,7 @@ static int stm32f7_i2c_setup_timing(struct stm32f7_i2c_dev *i2c_dev,
dev_dbg(i2c_dev->dev, "I2C Rise(%i) and Fall(%i) Time\n",
setup->rise_time, setup->fall_time);
dev_dbg(i2c_dev->dev, "I2C Analog Filter(%s), DNF(%i)\n",
- (i2c_dev->analog_filter ? "On" : "Off"), i2c_dev->dnf);
+ str_on_off(i2c_dev->analog_filter), i2c_dev->dnf);
i2c_dev->bus_rate = setup->speed_freq;