]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
i2c: isch: Use string_choices API instead of ternary operator
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 16 Sep 2024 12:01:29 +0000 (15:01 +0300)
committerAndi Shyti <andi.shyti@kernel.org>
Wed, 13 Nov 2024 22:29:45 +0000 (23:29 +0100)
Use modern string_choices API instead of manually determining the
output using ternary operator.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
drivers/i2c/busses/i2c-isch.c

index 96ee73fe6e817fbde7e71fce536eb46a67c3a0b1..f44c5fa276dc7f162be0700cc4f0e2e43e0f43eb 100644 (file)
 #include <linux/platform_device.h>
 #include <linux/kernel.h>
 #include <linux/delay.h>
-#include <linux/stddef.h>
 #include <linux/ioport.h>
 #include <linux/i2c.h>
 #include <linux/io.h>
+#include <linux/stddef.h>
+#include <linux/string_choices.h>
 
 /* SCH SMBus address offsets */
 #define SMBHSTCNT      (0 + sch_smba)
@@ -153,7 +154,7 @@ static s32 sch_access(struct i2c_adapter *adap, u16 addr,
                outw(backbone_speed / (4 * 100), SMBHSTCLK);
        }
 
-       dev_dbg(&adap->dev, "access size: %d %s\n", size, (read_write)?"READ":"WRITE");
+       dev_dbg(&adap->dev, "access size: %d %s\n", size, str_read_write(read_write));
        switch (size) {
        case I2C_SMBUS_QUICK:
                outb((addr << 1) | read_write, SMBHSTADD);