This patch fixes these warning messages found by sparse:
drivers/staging/iio/accel/sca3000_ring.c:120:61: warning: incorrect type in argument 1 (different base types)
drivers/staging/iio/accel/sca3000_ring.c:120:61: expected restricted __be16 const [usertype] *p
drivers/staging/iio/accel/sca3000_ring.c:120:61: got unsigned short [usertype] *
Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
goto error_ret;
for (i = 0; i < num_read; i++)
- *(((u16 *)rx) + i) = be16_to_cpup((u16 *)rx + i);
+ *(((u16 *)rx) + i) = be16_to_cpup((__be16 *)rx + i);
if (copy_to_user(buf, rx, num_read))
ret = -EFAULT;