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=-0.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 9DB39C4708C for ; Fri, 28 May 2021 10:49:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 78C93613B6 for ; Fri, 28 May 2021 10:49:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236562AbhE1Kup (ORCPT ); Fri, 28 May 2021 06:50:45 -0400 Received: from mga12.intel.com ([192.55.52.136]:12269 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236484AbhE1Kuo (ORCPT ); Fri, 28 May 2021 06:50:44 -0400 IronPort-SDR: qn1e/5GeU4f+tZWShtvDz9xoV81ErfqgU5pUo8R6RTUXVSIybBgpPyctOA83m1wcDuSiEF8nR7 3htd9PLpVuAQ== X-IronPort-AV: E=McAfee;i="6200,9189,9997"; a="182596989" X-IronPort-AV: E=Sophos;i="5.83,229,1616482800"; d="scan'208";a="182596989" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2021 03:49:06 -0700 IronPort-SDR: uAJZQ4kGZxT8yM1Hc8dvDcBEnkdMBK0oGayVCzkIKa/uPeMzdM8kWqbBomJsEkmae/8Ayb7dKE qToo+ruMlyFw== X-IronPort-AV: E=Sophos;i="5.83,229,1616482800"; d="scan'208";a="548547389" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2021 03:49:03 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1lma33-00FIGn-4n; Fri, 28 May 2021 13:49:01 +0300 Date: Fri, 28 May 2021 13:49:01 +0300 From: Andy Shevchenko To: Pavel Machek Cc: 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: References: <20210510095045.3299382-1-andy.shevchenko@gmail.com> <20210510095045.3299382-12-andy.shevchenko@gmail.com> <20210528100906.GG2209@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210528100906.GG2209@amd> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org 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