iio: adc: lpc18xx_adc: Convert probe to device managed version
The remove function and the goto sections are not necessary if devm
functions are used.
Convert device register to devm version. Add hook functions to release
device resources, and use them inside probe with devm_add_action,
which will release resources on driver detach.
To maintain the order of which device resources were released/reseted,
register the hook functions as soon as resources are obtained/initialized.
Since devres actions are called on driver detach, the remove
function and the error-handling goto sections are no longer necessary.
Signed-off-by: André Gustavo Nakagomi Lopez <andregnl@usp.br>
Link: https://lore.kernel.org/r/YWnMsGlc/I35gYvy@Andryuu.br
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>