Skip to content

Commit 95fb1e7

Browse files
M-Vaittinenjic23
authored andcommitted
iio: light: bu27008: Fix intensity data type
The intensity data from bu27008 is unsigned. The type of the scan data was incorrectly marked as signed resulting large intensity values to be interpreted as negative ones. Fix the scan data type. Fixes: 41ff93d ("iio: light: ROHM BU27008 color sensor") Signed-off-by: Matti Vaittinen <[email protected]> Link: https://lore.kernel.org/r/240a7ca5fc1b76da20d81f930d00f31a54b1fdf8.1686648422.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 096649c commit 95fb1e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iio/light/rohm-bu27008.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ static const struct iio_itime_sel_mul bu27008_itimes[] = {
190190
.address = BU27008_REG_##data##_LO, \
191191
.scan_index = BU27008_##color, \
192192
.scan_type = { \
193-
.sign = 's', \
193+
.sign = 'u', \
194194
.realbits = 16, \
195195
.storagebits = 16, \
196196
.endianness = IIO_LE, \

0 commit comments

Comments
 (0)