staging:iio:tsl2x7x: Use iio_str_to_fixedpoint instead of open-coding it
authorLars-Peter Clausen <lars@metafoo.de>
Thu, 10 Jan 2013 16:18:00 +0000 (16:18 +0000)
committerJonathan Cameron <jic23@kernel.org>
Sat, 26 Jan 2013 10:07:46 +0000 (10:07 +0000)
commit3f6a0bad61e34c648fd08ff8dcbfdd58148963d2
tree5be7685f8e1fc99136a732ae844971174a4d4f70
parent06ddd353f5c8678238d519dcecf9d557e5e1f7a6
staging:iio:tsl2x7x: Use iio_str_to_fixedpoint instead of open-coding it

The tsl2x7x driver has a copy'n'pasted version of the iio_str_to_fixedpoint()
function from the IIO core. Replace this custom copy and use
iio_str_to_fixedpoint instead.

The patch also introduces a slight functional change in that it makes sure that
in case of a parsing error the error is reported back to userspace instead of
silently ignoring it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jon Brenner <jon.brenner@ams.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/light/tsl2x7x_core.c