RE: [PATCH v3 14/14] iio: hmc425a: simplify using devm_regulator_get_enable()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Matti Vaittinen <mazziesaccount@xxxxxxxxx>
> Sent: Tuesday, August 30, 2022 3:00 PM
> To: Sa, Nuno <Nuno.Sa@xxxxxxxxxx>; Matti Vaittinen
> <matti.vaittinen@xxxxxxxxxxxxxxxxx>
> Cc: Lars-Peter Clausen <lars@xxxxxxxxxx>; Hennerich, Michael
> <Michael.Hennerich@xxxxxxxxxx>; Jonathan Cameron
> <jic23@xxxxxxxxxx>; linux-iio@xxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH v3 14/14] iio: hmc425a: simplify using
> devm_regulator_get_enable()
> 
> [External]
> 
> On 8/30/22 14:49, Sa, Nuno wrote:
> >
> >> From: Matti Vaittinen <mazziesaccount@xxxxxxxxx>
> >> Sent: Friday, August 19, 2022 9:21 PM
> >> To: Matti Vaittinen <mazziesaccount@xxxxxxxxx>; Matti Vaittinen
> >> <matti.vaittinen@xxxxxxxxxxxxxxxxx>
> >> Cc: Lars-Peter Clausen <lars@xxxxxxxxxx>; Hennerich, Michael
> >> <Michael.Hennerich@xxxxxxxxxx>; Jonathan Cameron
> >> <jic23@xxxxxxxxxx>; linux-iio@xxxxxxxxxxxxxxx; linux-
> >> kernel@xxxxxxxxxxxxxxx
> >> Subject: [PATCH v3 14/14] iio: hmc425a: simplify using
> >> devm_regulator_get_enable()
> >>
> >> [External]
> >>
> >> Drop open-coded pattern: 'devm_regulator_get(),
> regulator_enable(),
> >> add_action_or_reset(regulator_disable)' and use the
> >> devm_regulator_get_enable() and drop the pointer to the
> regulator.
> >> This simplifies code and makes it less tempting to add manual
> control
> >> for the regulator which is also controlled by devm.
> >>
> >> Signed-off-by: Matti Vaittinen <mazziesaccount@xxxxxxxxx>
> >>
> >> ---
> >
> > Acked-by: Nuno Sá <nuno.sa@xxxxxxxxxx>
> >
> > (I see that in this patch you are not using dev_err_probe(). Maybe
> some
> > consistency in the series and where applicable would be appropriate
> :))
> 
> I don't think the driver did originally print an error if regulator get
> or enable failed. I didn't want to add any new prints - just converted
> the existing ones to use dev_err_probe(). I believe adding new prints
> would've been somewhat unrelated change :)
> 

Ahh that makes sense. I failed to see the print that you were replacing
in the ad7606 patch...

- Nuno Sá




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux