From: David Lechner Date: Wed, 22 Jan 2025 23:16:59 +0000 (-0600) Subject: iio: dac: ad5791: fix storage X-Git-Tag: v6.15-rc1~78^2~8^2~189 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3ea0944dca9b855da474fbe08401fb82b2d9af99;p=thirdparty%2Fkernel%2Flinux.git iio: dac: ad5791: fix storage IIO uses "natural" alignment so storagebits should always be a power of 2. Change storagebits to 32 since that is the natural size to store 24 bits of data. The ad5791 driver currently doesn't use this field anywhere and doesn't support buffered writes, so this does not change anything. We just don't want anyone to think that it is OK to have storagebits = 24 in other drivers. Signed-off-by: David Lechner Reviewed-by: Nuno Sá Link: https://patch.msgid.link/20250122-iio-dac-ad5791-fix-storagebits-v1-1-53746e0f25cd@baylibre.com Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/dac/ad5791.c b/drivers/iio/dac/ad5791.c index 57374f78f6b88..034228a7c059f 100644 --- a/drivers/iio/dac/ad5791.c +++ b/drivers/iio/dac/ad5791.c @@ -294,7 +294,7 @@ static const struct ad5791_chip_info _name##_chip_info = { \ .scan_type = { \ .sign = 'u', \ .realbits = (bits), \ - .storagebits = 24, \ + .storagebits = 32, \ .shift = (_shift), \ }, \ .ext_info = ad5791_ext_info, \