lkml.org 
[lkml]   [2013]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH V2 06/18] regulator: gpio-regulator: use devm_regulator_register()
Date
On Thursday, September 26, 2013 3:20 PM, Sachin Kamat wrote:
> On 26 September 2013 07:36, Jingoo Han <jg1.han@samsung.com> wrote:
> > Use devm_regulator_register() to make cleanup paths simpler.
> > @@ -349,8 +350,6 @@ static int gpio_regulator_remove(struct platform_device *pdev)
> > {
> > struct gpio_regulator_data *drvdata = platform_get_drvdata(pdev);
> >
> > - regulator_unregister(drvdata->dev);
> > -
> > gpio_free_array(drvdata->gpios, drvdata->nr_gpios);
> >
> > kfree(drvdata->states);
>
> In most of the cases where unregister doesn't happen to be the only or
> last call in the remove path,
> I am not sure if change in ordering wouldn't cause any functional
> issues. For. e.g., in this patch we are freeing the gpios and the
> driver states even before unregistering the device which is logically
> not right.
>

OK, I see.
I agree with your suggestion in order to keep the code stable.
I will remove this patch from next v3 patch series.

Best regards,
Jingoo Han



\
 
 \ /
  Last update: 2013-09-26 09:21    [W:0.075 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site