Re: [PATCH v1 11/28] leds: lgm-sso: Remove explicit managed resource cleanups

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

 



On Fri, May 28, 2021 at 12:09:06PM +0200, Pavel Machek wrote:
> On Mon 2021-05-10 12:50:28, Andy Shevchenko wrote:
> > The idea of managed resources that they will be cleaned up automatically
> > and in the proper order. Remove explicit cleanups.
> 
> Are you really sure this is good idea with the regmap_update_bits in
> between?

Good question. I will check it.

> > -	/* unregister led */
> > -	devm_led_classdev_unregister(priv->dev, &led->cdev);
> > -
> >  	/* clear HW control bit */
> >  	if (led->desc.hw_trig)
> >  		regmap_update_bits(priv->mmap, SSO_CON3, BIT(led->desc.pin), 0);
> >  
> > -	if (led->gpiod)
> > -		devm_gpiod_put(priv->dev, led->gpiod);
> > -
> >  	led->priv = NULL;


-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux