i2c: reformat comments around i2c_smbus_xfer_emulated()

Use Kernel coding style for better readability.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Reviewed-by: Peter Rosin <peda@axentia.se>
This commit is contained in:
Wolfram Sang 2018-02-26 22:17:53 +01:00
parent 84cb55c422
commit be5b928038
1 changed files with 10 additions and 6 deletions

View File

@ -308,17 +308,21 @@ static void i2c_smbus_try_get_dmabuf(struct i2c_msg *msg, u8 init_val)
msg->buf[0] = init_val; msg->buf[0] = init_val;
} }
/* Simulate a SMBus command using the i2c protocol /*
No checking of parameters is done! */ * Simulate a SMBus command using the I2C protocol.
* No checking of parameters is done!
*/
static s32 i2c_smbus_xfer_emulated(struct i2c_adapter *adapter, u16 addr, static s32 i2c_smbus_xfer_emulated(struct i2c_adapter *adapter, u16 addr,
unsigned short flags, unsigned short flags,
char read_write, u8 command, int size, char read_write, u8 command, int size,
union i2c_smbus_data *data) union i2c_smbus_data *data)
{ {
/* So we need to generate a series of msgs. In the case of writing, we /*
need to use only one message; when reading, we need two. We initialize * So we need to generate a series of msgs. In the case of writing, we
most things with sane defaults, to keep the code below somewhat * need to use only one message; when reading, we need two. We
simpler. */ * initialize most things with sane defaults, to keep the code below
* somewhat simpler.
*/
unsigned char msgbuf0[I2C_SMBUS_BLOCK_MAX+3]; unsigned char msgbuf0[I2C_SMBUS_BLOCK_MAX+3];
unsigned char msgbuf1[I2C_SMBUS_BLOCK_MAX+2]; unsigned char msgbuf1[I2C_SMBUS_BLOCK_MAX+2];
int num = read_write == I2C_SMBUS_READ ? 2 : 1; int num = read_write == I2C_SMBUS_READ ? 2 : 1;