Skip to content

Commit

Permalink
i2c: nvidia-gpu: Use put_unaligned_be24()
Browse files Browse the repository at this point in the history
This makes the driver code slightly easier to read.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Ajay Gupta <ajayg@nvidia.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
  • Loading branch information
Andy Shevchenko authored and Wolfram Sang committed Sep 21, 2020
1 parent 86d36a5 commit 9b65b02
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/i2c/busses/i2c-nvidia-gpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@ static int gpu_i2c_read(struct gpu_i2c_dev *i2cd, u8 *data, u16 len)
put_unaligned_be16(val, data);
break;
case 3:
put_unaligned_be16(val >> 8, data);
data[2] = val;
put_unaligned_be24(val, data);
break;
case 4:
put_unaligned_be32(val, data);
Expand Down

0 comments on commit 9b65b02

Please sign in to comment.