diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2020-07-16 16:53:19 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2020-09-21 12:05:40 +0200 |
commit | 9b65b020fff70bc070c4cb8fcf8ea8a1f70b111b (patch) | |
tree | 924608fec745cad4a916175ce0952252f848559b | |
parent | i2c: ismt: Add support for Intel Emmitsburg PCH (diff) | |
download | linux-9b65b020fff70bc070c4cb8fcf8ea8a1f70b111b.tar.xz linux-9b65b020fff70bc070c4cb8fcf8ea8a1f70b111b.zip |
i2c: nvidia-gpu: Use put_unaligned_be24()
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>
-rw-r--r-- | drivers/i2c/busses/i2c-nvidia-gpu.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c b/drivers/i2c/busses/i2c-nvidia-gpu.c index f480105000b8..f9a69b109e5c 100644 --- a/drivers/i2c/busses/i2c-nvidia-gpu.c +++ b/drivers/i2c/busses/i2c-nvidia-gpu.c @@ -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); |