aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/algos/i2c-algo-pcf.c
diff options
context:
space:
mode:
authorYumeng Fang <[email protected]>2025-05-23 08:54:45 +0000
committerWolfram Sang <[email protected]>2025-05-23 15:28:07 +0000
commit17b7d785fc7fc94b94acc080e09de4b5023fbc1e (patch)
tree503ec23c3dcd73f8d91ccdc037ab412631f088d3 /drivers/i2c/algos/i2c-algo-pcf.c
parentMerge tag 'i2c-host-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/an... (diff)
downloadkernel-17b7d785fc7fc94b94acc080e09de4b5023fbc1e.tar.gz
kernel-17b7d785fc7fc94b94acc080e09de4b5023fbc1e.zip
i2c: Use str_read_write() helper
Remove hard-coded strings by using the str_read_write() helper. Signed-off-by: Yumeng Fang <[email protected]> Signed-off-by: Yunjian Long <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
Diffstat (limited to 'drivers/i2c/algos/i2c-algo-pcf.c')
-rw-r--r--drivers/i2c/algos/i2c-algo-pcf.c3
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);