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 78a6a1ab3ece00a51fa0f84ac0905762aede99d6..5b377373f48d147b6a41406ca8468c4fb4dc5fc8 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;