Skip to content

Commit be3b425

Browse files
Yumeng FangAndi Shyti
authored andcommitted
i2c: stm32f7: Use str_on_off() helper
Remove hard-coded strings by using the str_on_off() helper. Signed-off-by: Yumeng Fang <[email protected]> Acked-by: Alain Volmat <[email protected]> Signed-off-by: Andi Shyti <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 8428582 commit be3b425

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/i2c/busses/i2c-stm32f7.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include <linux/regmap.h>
3535
#include <linux/reset.h>
3636
#include <linux/slab.h>
37+
#include <linux/string_choices.h>
3738

3839
#include "i2c-stm32.h"
3940

@@ -722,7 +723,7 @@ static int stm32f7_i2c_setup_timing(struct stm32f7_i2c_dev *i2c_dev,
722723
dev_dbg(i2c_dev->dev, "I2C Rise(%i) and Fall(%i) Time\n",
723724
setup->rise_time, setup->fall_time);
724725
dev_dbg(i2c_dev->dev, "I2C Analog Filter(%s), DNF(%i)\n",
725-
(i2c_dev->analog_filter ? "On" : "Off"), i2c_dev->dnf);
726+
str_on_off(i2c_dev->analog_filter), i2c_dev->dnf);
726727

727728
i2c_dev->bus_rate = setup->speed_freq;
728729

0 commit comments

Comments
 (0)