diff options
author | Yumeng Fang <fang.yumeng@zte.com.cn> | 2025-05-23 16:54:45 +0800 |
---|---|---|
committer | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2025-05-23 17:28:07 +0200 |
commit | 17b7d785fc7fc94b94acc080e09de4b5023fbc1e (patch) | |
tree | 503ec23c3dcd73f8d91ccdc037ab412631f088d3 /drivers/i2c/algos/i2c-algo-pcf.c | |
parent | 9c7dcf4c16ef521657450a82dc26775d6f556209 (diff) |
i2c: Use str_read_write() helper
Remove hard-coded strings by using the str_read_write() helper.
Signed-off-by: Yumeng Fang <fang.yumeng@zte.com.cn>
Signed-off-by: Yunjian Long <long.yunjian@zte.com.cn>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Diffstat (limited to 'drivers/i2c/algos/i2c-algo-pcf.c')
-rw-r--r-- | drivers/i2c/algos/i2c-algo-pcf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/i2c/algos/i2c-algo-pcf.c b/drivers/i2c/algos/i2c-algo-pcf.c index 7a01f2687b4c..740066ceaea3 100644 --- a/drivers/i2c/algos/i2c-algo-pcf.c +++ b/drivers/i2c/algos/i2c-algo-pcf.c @@ -19,6 +19,7 @@ #include <linux/errno.h> #include <linux/i2c.h> #include <linux/i2c-algo-pcf.h> +#include <linux/string_choices.h> #include "i2c-algo-pcf.h" @@ -316,7 +317,7 @@ static int pcf_xfer(struct i2c_adapter *i2c_adap, pmsg = &msgs[i]; DEB2(printk(KERN_DEBUG "i2c-algo-pcf.o: Doing %s %d bytes to 0x%02x - %d of %d messages\n", - pmsg->flags & I2C_M_RD ? "read" : "write", + str_read_write(pmsg->flags & I2C_M_RD), pmsg->len, pmsg->addr, i + 1, num);) ret = pcf_doAddress(adap, pmsg); |