lkml.org 
[lkml]   [2021]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 11/28] leds: lgm-sso: Remove explicit managed resource cleanups
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?

BR,
Pavel

> ---
> drivers/leds/blink/leds-lgm-sso.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/drivers/leds/blink/leds-lgm-sso.c b/drivers/leds/blink/leds-lgm-sso.c
> index e76be25480b4..a7f2e5436ba2 100644
> --- a/drivers/leds/blink/leds-lgm-sso.c
> +++ b/drivers/leds/blink/leds-lgm-sso.c
> @@ -606,16 +606,10 @@ static void sso_led_shutdown(struct sso_led *led)
> {
> struct sso_led_priv *priv = led->priv;
>
> - /* 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;
> }
>

--
http://www.livejournal.com/~pavelmachek
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2021-05-28 12:09    [W:0.354 / U:1.912 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site