mirror of
https://github.com/torvalds/linux.git
synced 2026-08-03 22:10:38 +02:00
iio: adc: mt6360-adc: use = { } instead of memset()
Use { } instead of memset() to zero-initialize stack memory to simplify
the code.
Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20250611-iio-zero-init-stack-with-instead-of-memset-v1-4-ebb2d0a24302@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
3a780d29ae
commit
b8f008100a
|
|
@ -264,10 +264,9 @@ static irqreturn_t mt6360_adc_trigger_handler(int irq, void *p)
|
|||
struct {
|
||||
u16 values[MT6360_CHAN_MAX];
|
||||
aligned_s64 timestamp;
|
||||
} data;
|
||||
} data = { };
|
||||
int i = 0, bit, val, ret;
|
||||
|
||||
memset(&data, 0, sizeof(data));
|
||||
iio_for_each_active_channel(indio_dev, bit) {
|
||||
ret = mt6360_adc_read_channel(mad, bit, &val);
|
||||
if (ret < 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user