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

iio: adc: ti-ads1119: 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: Francesco Dolcini <francesco.dolcini@toradex.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-9-ebb2d0a24302@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

David Lechner and committed by
Jonathan Cameron
6c25238a 6d1db002

+1 -3
+1 -3
drivers/iio/adc/ti-ads1119.c
··· 507 507 struct { 508 508 s16 sample; 509 509 aligned_s64 timestamp; 510 - } scan; 510 + } scan = { }; 511 511 unsigned int index; 512 512 int ret; 513 - 514 - memset(&scan, 0, sizeof(scan)); 515 513 516 514 if (!iio_trigger_using_own(indio_dev)) { 517 515 index = find_first_bit(indio_dev->active_scan_mask,