staging: iio: tsl2583: don't assume an unsigned int is 32 bits

in_illuminance_lux_table_store assumes that an unsigned int is 32 bits.
Replace this with sizeof(value[1]).

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
Brian Masney 2016-11-12 13:19:33 -05:00 committed by Jonathan Cameron
parent 1ad513604f
commit 8386dd50a7
1 changed files with 1 additions and 1 deletions

View File

@ -582,7 +582,7 @@ static ssize_t in_illuminance_lux_table_store(struct device *dev,
/* Zero out the table */
memset(tsl2583_device_lux, 0, sizeof(tsl2583_device_lux));
memcpy(tsl2583_device_lux, &value[1], value[0] * 4);
memcpy(tsl2583_device_lux, &value[1], value[0] * sizeof(value[1]));
ret = len;