|
19 | 19 | #include <linux/of.h>
|
20 | 20 | #include <linux/platform_device.h>
|
21 | 21 | #include <linux/string.h>
|
| 22 | +#include <linux/string_choices.h> |
22 | 23 |
|
23 | 24 | /* Defines what functionality is present. */
|
24 | 25 | #define MLXBF_I2C_FUNC_SMBUS_BLOCK \
|
@@ -2038,37 +2039,37 @@ static s32 mlxbf_i2c_smbus_xfer(struct i2c_adapter *adap, u16 addr,
|
2038 | 2039 | read ? &data->byte : &command, read,
|
2039 | 2040 | pec);
|
2040 | 2041 | dev_dbg(&adap->dev, "smbus %s byte, slave 0x%02x.\n",
|
2041 |
| - read ? "read" : "write", addr); |
| 2042 | + str_read_write(read), addr); |
2042 | 2043 | break;
|
2043 | 2044 |
|
2044 | 2045 | case I2C_SMBUS_BYTE_DATA:
|
2045 | 2046 | mlxbf_i2c_smbus_data_byte_func(&request, &command, &data->byte,
|
2046 | 2047 | read, pec);
|
2047 | 2048 | dev_dbg(&adap->dev, "smbus %s byte data at 0x%02x, slave 0x%02x.\n",
|
2048 |
| - read ? "read" : "write", command, addr); |
| 2049 | + str_read_write(read), command, addr); |
2049 | 2050 | break;
|
2050 | 2051 |
|
2051 | 2052 | case I2C_SMBUS_WORD_DATA:
|
2052 | 2053 | mlxbf_i2c_smbus_data_word_func(&request, &command,
|
2053 | 2054 | (u8 *)&data->word, read, pec);
|
2054 | 2055 | dev_dbg(&adap->dev, "smbus %s word data at 0x%02x, slave 0x%02x.\n",
|
2055 |
| - read ? "read" : "write", command, addr); |
| 2056 | + str_read_write(read), command, addr); |
2056 | 2057 | break;
|
2057 | 2058 |
|
2058 | 2059 | case I2C_SMBUS_I2C_BLOCK_DATA:
|
2059 | 2060 | byte_cnt = data->block[0];
|
2060 | 2061 | mlxbf_i2c_smbus_i2c_block_func(&request, &command, data->block,
|
2061 | 2062 | &byte_cnt, read, pec);
|
2062 | 2063 | dev_dbg(&adap->dev, "i2c %s block data, %d bytes at 0x%02x, slave 0x%02x.\n",
|
2063 |
| - read ? "read" : "write", byte_cnt, command, addr); |
| 2064 | + str_read_write(read), byte_cnt, command, addr); |
2064 | 2065 | break;
|
2065 | 2066 |
|
2066 | 2067 | case I2C_SMBUS_BLOCK_DATA:
|
2067 | 2068 | byte_cnt = read ? I2C_SMBUS_BLOCK_MAX : data->block[0];
|
2068 | 2069 | mlxbf_i2c_smbus_block_func(&request, &command, data->block,
|
2069 | 2070 | &byte_cnt, read, pec);
|
2070 | 2071 | dev_dbg(&adap->dev, "smbus %s block data, %d bytes at 0x%02x, slave 0x%02x.\n",
|
2071 |
| - read ? "read" : "write", byte_cnt, command, addr); |
| 2072 | + str_read_write(read), byte_cnt, command, addr); |
2072 | 2073 | break;
|
2073 | 2074 |
|
2074 | 2075 | case I2C_FUNC_SMBUS_PROC_CALL:
|
|
0 commit comments