iio: adc: adc128s052: Simplify adc128_probe()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Thu, 26 Aug 2021 18:36:22 +0000 (20:36 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 21 Oct 2021 19:03:01 +0000 (20:03 +0100)
commit16cc9aa4a8a4dcd40eabd245f4533e1ea1b1e37f
tree4e9b3af7e9d68c1a7cc60d298c3ca7fa2084fd88
parent39aa50400794080e401a0334fbf0b058a67fc16c
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: Alexandru Ardelean <ardeleanalex@gmail.com>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Link: https://lore.kernel.org/r/4fa7fcc59c40e27af0569138d656c698a53dbd44.1630002770.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ti-adc128s052.c