staging: iio: resolver: replace iio_device_register by devm_iio_device_register
authorIoana Ciornei <ciorneiioana@gmail.com>
Fri, 2 Oct 2015 10:37:50 +0000 (13:37 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Oct 2015 07:31:07 +0000 (08:31 +0100)
commit877cdf9115122e068245326da519a848d2387221
tree1ab14d1f99d3897c30b3aa251240da46e565c86e
parent86727e30d1d6485b5f8b4a84790ac659dc002d27
staging: iio: resolver: replace iio_device_register by devm_iio_device_register

Use devm_iio_device_register instead of iio_device_register when the remove
function is only used to call iio_device_unregister in order to ease the error path.
Since resource managed functions implicitly call unregister at driver detach also remove
iio_device_unregister

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/iio/resolver/ad2s90.c