mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 11:37:06 +02:00
iio: light: veml6030: fix channel type when pushing events
The events are registered for IIO_LIGHT and not for IIO_INTENSITY.
Use the correct channel type.
When at it, fix minor checkpatch code style warning (alignment).
Cc: stable@vger.kernel.org
Fixes: 7b779f573c ("iio: light: add driver for veml6030 ambient light sensor")
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
parent
ff29241030
commit
c52bb33b64
|
|
@ -875,9 +875,11 @@ static irqreturn_t veml6030_event_handler(int irq, void *private)
|
|||
else
|
||||
evtdir = IIO_EV_DIR_FALLING;
|
||||
|
||||
iio_push_event(indio_dev, IIO_UNMOD_EVENT_CODE(IIO_INTENSITY,
|
||||
0, IIO_EV_TYPE_THRESH, evtdir),
|
||||
iio_get_time_ns(indio_dev));
|
||||
iio_push_event(indio_dev, IIO_UNMOD_EVENT_CODE(IIO_LIGHT,
|
||||
0,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
evtdir),
|
||||
iio_get_time_ns(indio_dev));
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user