iio: fix drivers that consider 0 as a valid IRQ in client->irq
authorOctavian Purdila <octavian.purdila@intel.com>
Fri, 5 Jun 2015 13:59:42 +0000 (16:59 +0300)
committerJonathan Cameron <jic23@kernel.org>
Thu, 23 Jul 2015 19:23:11 +0000 (20:23 +0100)
commitc176becd81843426eb8ab3b03aeeb19e387345fe
treed68666af7248a15085055896f95dfa5d776a057b
parentd9abc615ea1659b6967a00e95b1b3a7fd4079b80
iio: fix drivers that consider 0 as a valid IRQ in client->irq

Since patch "i2c / ACPI: Use 0 to indicate that device does not have
interrupt assigned" [1], 0 is not a valid i2c client irq anymore, so
change all driver's checks accordingly.

The same issue occurs when the device is instantiated via device tree
with no IRQ, or from the i2c sysfs interface, even before the patch
above.

[1] http://lkml.kernel.org/g/<1430908148-201129-3-git-send-email-mika.westerberg@linux.intel.com>

Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/accel/bmc150-accel.c
drivers/iio/accel/kxcjk-1013.c
drivers/iio/accel/mma9553.c
drivers/iio/imu/kmx61.c