Skip to content
Commit 16cc9aa4 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Jonathan Cameron
Browse files

iio: adc: adc128s052: Simplify adc128_probe()



Turn 'adc128_probe()' into a full resource managed function to simplify the
code.

This way, the .remove function can be removed.
Doing so, the only 'spi_get_drvdata()' call is removed and the
corresponding 'spi_set_drvdata()' can be removed as well.

Suggested-by: default avatarAlexandru Ardelean <ardeleanalex@gmail.com>
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarAlexandru Ardelean <ardeleanalex@gmail.com>
Link: https://lore.kernel.org/r/4fa7fcc59c40e27af0569138d656c698a53dbd44.1630002770.git.christophe.jaillet@wanadoo.fr


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