commit | 107eb59bc15ccd999b8cd297172691673396ec8f | [log] [tgz] |
---|---|---|
author | Brian Masney <masneyb@onstation.org> | Sat Mar 03 20:49:33 2018 -0500 |
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | Sat Mar 10 14:29:39 2018 +0000 |
tree | 3dda0081034ac08dc325a814ff85da82671e18f4 | |
parent | eac15d8ded8f23a7cda681e2b2c7b86cf8535688 [diff] |
staging: iio: tsl2x7x: add common function for reading chip status There were three places where the same chunk of code was used to read the chip status. This patch creates a common function tsl2x7x_read_status() to reduce duplicate code. This patch also corrects tsl2x7x_event_handler() to properly check for an error after reading the chip status. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>