summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-11-16 13:33:24 +0100
committerJonathan Cameron <jic23@kernel.org>2014-12-12 13:28:25 +0100
commit8f6eb02596cc297c12ee16c86b9bbe1c186dda15 (patch)
tree4e5748b4188d34e21b2991fd108f60518456d6a8
parentiio: ak8975: add ak09911 and ak09912 support (diff)
downloadlinux-8f6eb02596cc297c12ee16c86b9bbe1c186dda15.tar.xz
linux-8f6eb02596cc297c12ee16c86b9bbe1c186dda15.zip
iio: common: remove unnecessary sizeof(u8)
sizeof(u8) is always 1. Signed-off-by: Fabian Frederick <fabf@skynet.be> Acked-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r--drivers/iio/common/st_sensors/st_sensors_spi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/common/st_sensors/st_sensors_spi.c b/drivers/iio/common/st_sensors/st_sensors_spi.c
index 78a6a1ab3ece..5b377373f48d 100644
--- a/drivers/iio/common/st_sensors/st_sensors_spi.c
+++ b/drivers/iio/common/st_sensors/st_sensors_spi.c
@@ -54,7 +54,7 @@ static int st_sensors_spi_read(struct st_sensor_transfer_buffer *tb,
if (err)
goto acc_spi_read_error;
- memcpy(data, tb->rx_buf, len*sizeof(u8));
+ memcpy(data, tb->rx_buf, len);
mutex_unlock(&tb->buf_lock);
return len;