]> git.dujemihanovic.xyz Git - linux.git/commit
i2c: cp2615: Fix 'assignment to __be16' warning
authorBence Csókás <bence98@sch.bme.hu>
Mon, 30 Oct 2023 17:19:10 +0000 (17:19 +0000)
committerWolfram Sang <wsa@kernel.org>
Wed, 8 Nov 2023 09:27:17 +0000 (10:27 +0100)
commitbdba49cbba41f0bea54fc93529bbef4d6ceaa3cd
tree167db8d762dd80948c424a35a0799894e992e596
parentcc9c54232f04aef3a5d7f64a0ece7df00f1aaa3d
i2c: cp2615: Fix 'assignment to __be16' warning

While the preamble field _is_ technically big-endian, its value is always 0x2A2A,
which is the same in either endianness. However, to avoid generating a warning,
we should still call `htons()` explicitly.

Signed-off-by: Bence Csókás <bence98@sch.bme.hu>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-cp2615.c