On Sun, 16 Oct 2022 18:09:45 +0100 Jonathan Cameron <jic23@xxxxxxxxxx> wrote: > From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> > > A very simple example of how using devm_ managed calls for everything > can reduce complexity error handling and removal ordering in a driver. > > Note I don't have one of these to test so if anyone has a chance to do > so or give these a quick look at that would be much appreciated. > Note this is a fairly old driver, so relative unlikely original authors > still have access. > > Cc: Phani Movva <Phani.Movva@xxxxxxxxxx> > Cc: Naidu Tellapati <naidu.tellapati@xxxxxxxxxx> If anyone has time for a quick glance at this it would be much appreciated! Old maintainer issue of who is the fall back reviewer for the maintainers own patches to old drivers, where the authors etc have probably long since moved on. Jonathan > > Jonathan Cameron (5): > iio: adc: cc10001: Add local struct device *dev variable to avoid > repitition > iio: adc: cc10001: Add devm_add_action_or_reset() to disable > regulator. > iio: adc: cc10001: Use devm_clk_get_enabled() to avoid boilerplate. > iio: adc: cc10001: Use devm_ to call device power down. > iio: adc: cc10001: Switch remaining IIO calls in probe to devm_ forms. > > drivers/iio/adc/cc10001_adc.c | 89 +++++++++++++---------------------- > 1 file changed, 34 insertions(+), 55 deletions(-) >