RE: [PATCH v2 2/2] iio: imu: smi240: imu driver

From: Shen Jianping (ME-SE/EAD2)
Date: Fri Aug 09 2024 - 08:18:40 EST


Hi Christophe,

....
> +
> + data = iio_priv(indio_dev);
> + dev_set_drvdata(dev, indio_dev);
> + data->regmap = regmap;
> + data->capture = 0;

No need to explicitly initialize 'capture', devm_iio_device_alloc() already zeroes the allocated emmory.
It doesn't hurt to be explicit, but why this field and not the other ones?

-> This is the flag to enable capture mode. It is important to be disabled by default, therefore rather make this explicitly.

...

Jianping