From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A929CC47087 for ; Fri, 28 May 2021 10:09:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 85759611C2 for ; Fri, 28 May 2021 10:09:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235876AbhE1KKn (ORCPT ); Fri, 28 May 2021 06:10:43 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:34056 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235361AbhE1KKm (ORCPT ); Fri, 28 May 2021 06:10:42 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 96D1C1C0B76; Fri, 28 May 2021 12:09:07 +0200 (CEST) Date: Fri, 28 May 2021 12:09:06 +0200 From: Pavel Machek To: Andy Shevchenko Cc: Andy Shevchenko , Amireddy Mallikarjuna reddy , Linus Walleij , Marek =?iso-8859-1?Q?Beh=FAn?= , Abanoub Sameh , Dan Murphy , Krzysztof Kozlowski , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 11/28] leds: lgm-sso: Remove explicit managed resource cleanups Message-ID: <20210528100906.GG2209@amd> References: <20210510095045.3299382-1-andy.shevchenko@gmail.com> <20210510095045.3299382-12-andy.shevchenko@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XRI2XbIfl/05pQwm" Content-Disposition: inline In-Reply-To: <20210510095045.3299382-12-andy.shevchenko@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org --XRI2XbIfl/05pQwm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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(-) >=20 > 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 =3D led->priv; > =20 > - /* 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); > =20 > - if (led->gpiod) > - devm_gpiod_put(priv->dev, led->gpiod); > - > led->priv =3D NULL; > } > =20 --=20 http://www.livejournal.com/~pavelmachek --XRI2XbIfl/05pQwm Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAmCwwUIACgkQMOfwapXb+vKUqgCgiJK5z0DCUwmfQHqSIZ8esUk7 fkYAoJ3fBhQzuSC2Y+Rwi+WNjChH4G8m =3hpP -----END PGP SIGNATURE----- --XRI2XbIfl/05pQwm--