Re: [PATCH] iio: adc: ti-ads1119: fix sample size in scan struct for triggered buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 02, 2024 at 08:18:44PM +0100, Javier Carrasco wrote:
> This device returns signed, 16-bit samples as stated in its datasheet
> (see 8.5.2 Data Format). That is in line with the scan_type definition
> for the IIO_VOLTAGE channel, but 'unsigned int' is being used to read
> and push the data to userspace.
> 
> Given that the size of that type depends on the architecture (at least
> 2 bytes to store values up to 65535, but its actual size is often 4
> bytes), use the 's16' type to provide the same structure in all cases.
> 
> Fixes: a9306887eba4 ("iio: adc: ti-ads1119: Add driver")
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx>

Reviewed-by: Francesco Dolcini <francesco.dolcini@xxxxxxxxxxx>
Cc: stable@xxxxxxxxxxxxxxx

Thanks,
Francesco





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux