staging: iio: tsl2x7x: don't setup event handlers if interrupts are not configured
authorBrian Masney <masneyb@onstation.org>
Fri, 4 May 2018 02:53:11 +0000 (22:53 -0400)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 6 May 2018 18:05:00 +0000 (19:05 +0100)
commit95d22154d6bb980a80d59e500e8350d9a0e03f92
treeffb4c9cbccd0ddcee27e34f3b624caaa1ab1920a
parent2a74090249ed2cf9c1e383c2b450efdce08159ab
staging: iio: tsl2x7x: don't setup event handlers if interrupts are not configured

The driver would expose to userspace the events directory even if the
interrupts were not configured. This patch changes the driver so that
the events directory is not exposed to user space if interrupts are
not configured. This patch also corrects the indentation of the
chan_table_elements and info structure members.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/staging/iio/light/tsl2x7x.c