Message ID | 20221016170950.387751-1-jic23@kernel.org (mailing list archive) |
---|---|
Headers | show |
Series | iio: adc: cc10001: Devm conversion | expand |
On Sun, 16 Oct 2022 18:09:45 +0100 Jonathan Cameron <jic23@kernel.org> wrote: > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > 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@imgtec.com> > Cc: Naidu Tellapati <naidu.tellapati@imgtec.com> 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(-) >
> -----Original Message----- > From: Jonathan Cameron <jic23@kernel.org> > Sent: Saturday, October 29, 2022 2:44 PM > To: linux-iio@vger.kernel.org > Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>; Phani Movva > <Phani.Movva@imgtec.com>; Naidu Tellapati <naidu.tellapati@imgtec.com> > Subject: Re: [PATCH 0/5] iio: adc: cc10001: Devm conversion > > [External] > > On Sun, 16 Oct 2022 18:09:45 +0100 > Jonathan Cameron <jic23@kernel.org> wrote: > > > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > > > 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@imgtec.com> > > Cc: Naidu Tellapati <naidu.tellapati@imgtec.com> > > 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(-) > > Only minor comments, so feel free to add: Reviewed-by: Nuno Sá <nuno.sa@analog.com>
On Mon, 31 Oct 2022 11:19:19 +0000 "Sa, Nuno" <Nuno.Sa@analog.com> wrote: > > -----Original Message----- > > From: Jonathan Cameron <jic23@kernel.org> > > Sent: Saturday, October 29, 2022 2:44 PM > > To: linux-iio@vger.kernel.org > > Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>; Phani Movva > > <Phani.Movva@imgtec.com>; Naidu Tellapati <naidu.tellapati@imgtec.com> > > Subject: Re: [PATCH 0/5] iio: adc: cc10001: Devm conversion > > > > [External] > > > > On Sun, 16 Oct 2022 18:09:45 +0100 > > Jonathan Cameron <jic23@kernel.org> wrote: > > > > > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > > > > > 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@imgtec.com> > > > Cc: Naidu Tellapati <naidu.tellapati@imgtec.com> > > > > 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(-) > > > > > Only minor comments, so feel free to add: > > Reviewed-by: Nuno Sá <nuno.sa@analog.com> Tweaked as suggested whilst applying. Thanks! Applied to the togreg branch of iio.git and pushed out as testing for all the normal reasons. Thanks, Jonathan
From: Jonathan Cameron <Jonathan.Cameron@huawei.com> 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@imgtec.com> Cc: Naidu Tellapati <naidu.tellapati@imgtec.com> 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(-)