Skip to content
Commit 0be84447 authored by André Gustavo Nakagomi Lopez's avatar André Gustavo Nakagomi Lopez Committed by Jonathan Cameron
Browse files

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: default avatarAndré Gustavo Nakagomi Lopez <andregnl@usp.br>
Link: https://lore.kernel.org/r/YWnMsGlc/I35gYvy@Andryuu.br


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 26fa68c1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment