iio: common: remove unnecessary sizeof(u8)
authorFabian Frederick <fabf@skynet.be>
Sun, 16 Nov 2014 12:33:24 +0000 (13:33 +0100)
committerJonathan Cameron <jic23@kernel.org>
Fri, 12 Dec 2014 12:28:25 +0000 (12:28 +0000)
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>
drivers/iio/common/st_sensors/st_sensors_spi.c

index 78a6a1a..5b37737 100644 (file)
@@ -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;