Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: imu: smi330: remove redundant assignment in smi330_read_avail

In the IIO_CHAN_INFO_OVERSAMPLING_RATIO case, the type parameter
is assigned from smi330_average_attr.type and then immediately
overwritten with IIO_VAL_INT on the next line.

Since smi330_average_attr.type is already initialized to IIO_VAL_INT,
the second assignment is redundant. Remove the hardcoded assignment
to maintain consistency in the code.

Signed-off-by: Massimiliano Pellizzer <mpellizzer.dev@gmail.com>
Reviewed-by: Jianping Shen <Jianping.Shen@de.bosch.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Massimiliano Pellizzer and committed by
Jonathan Cameron
3624f038 5a306a64

-1
-1
drivers/iio/imu/smi330/smi330_core.c
··· 475 475 *vals = smi330_average_attr.vals; 476 476 *length = smi330_average_attr.len; 477 477 *type = smi330_average_attr.type; 478 - *type = IIO_VAL_INT; 479 478 return IIO_AVAIL_LIST; 480 479 case IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY: 481 480 *vals = smi330_bandwidth_attr.vals;