staging: iio: tsl2583: Use devm_iio_device_alloc
authorSachin Kamat <sachin.kamat@linaro.org>
Thu, 5 Sep 2013 09:29:00 +0000 (10:29 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sat, 7 Sep 2013 20:55:54 +0000 (21:55 +0100)
commit664716aedacbfd02535717b67be88678b348502a
tree8c885145f1608333d9e5bc0da1014ccf50e677ab
parent53703a493347ff2b43a6988bb5fcfa602e7ce67e
staging: iio: tsl2583: Use devm_iio_device_alloc

devm_iio_device_alloc makes the code simple. While at it also
fixed an uninitialized return with -EINVAL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: J. August Brenner <jbrenner@taosinc.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/light/tsl2583.c