From: Andy Shevchenko Date: Mon, 16 Sep 2024 12:01:29 +0000 (+0300) Subject: i2c: isch: Use string_choices API instead of ternary operator X-Git-Tag: v6.13-rc1~124^2^2~46 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=4b91878d9206f8ca9f6d08ee13c4bbcf2c459f54;p=linux-block.git i2c: isch: Use string_choices API instead of ternary operator Use modern string_choices API instead of manually determining the output using ternary operator. Signed-off-by: Andy Shevchenko Signed-off-by: Andi Shyti --- diff --git a/drivers/i2c/busses/i2c-isch.c b/drivers/i2c/busses/i2c-isch.c index 96ee73fe6e81..f44c5fa276dc 100644 --- a/drivers/i2c/busses/i2c-isch.c +++ b/drivers/i2c/busses/i2c-isch.c @@ -19,10 +19,11 @@ #include #include #include -#include #include #include #include +#include +#include /* 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);