Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1178807rwb; Thu, 6 Oct 2022 09:23:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM74RpRsQAN3p0IIy+ZjP5mKkBQr02RpdTPP/aOlO859Z+DpkFKnijXuAEOoLTZuhmICW7PJ X-Received: by 2002:a17:902:ec87:b0:176:d549:2f28 with SMTP id x7-20020a170902ec8700b00176d5492f28mr276889plg.12.1665073391218; Thu, 06 Oct 2022 09:23:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665073391; cv=none; d=google.com; s=arc-20160816; b=pTsMqeKo+jpAqaxlOLbuU8Bij3Y2/vVoNleR2Hgeu5ITNcP02pb2k2yOGaQZ6c/kL+ xaXWModvOVpSVk6WtUTyVuLwDXIAUuY76XkGcvhkhq7k5ieEySuhHfZxyHGTnK/kQO+x XfKWHHcZulMwC8PYBBPQ0Q2AutsFblF346Fq2Q1QLDZlNu9lweNl+jeTuEZFizXC0ZWR VIYZIQHh+9Ms76/tBia2aLiTiqY0jmGxu6ptbG/j/jY1BjKJOCHn0Q45kKkqXqnZ33I9 F0YUKYppaNWlP2dPB/pdvLnQw52lPIzQrC4/qIfVo4RmxQlLh4ftx+VSkAzITftIMRhC XFAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=3IaOa8PcUsG2LLI+ppnmonpUwuOcIZAjKAXqfJdHsY0=; b=sezsCZ/VakIWUIgaKx+e1B4PlWnSBF+JJYr6X0wPLOoekA8pukx/soiMcbUOHwNw1R vmM9EQ2xUqFRthFTRiZLyoQwhxwAzr9mKXLAa7DajnPxBFLcLuE0O0z5A2glJ5MAvDc6 sd5d4fL3XqexKiqn43x9mxihUP3LbCyvsWxtGUFAlKbes411Xbw4oQ0zV1MUV4SnDCzp 1hng2SlGosvzu6WVO4A8r0Y75HJ5nl7jMJfUqqncUFlHa6yi+UBn4Mbvy/13znjCc+Rl AVkrJYAJLoCaq/bXdBX9o0D4iDL9buwMOJ7NwBboCLXGboj8zC8k3p9duKqDx37bIZC+ spcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="Gnc+f/P7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b3-20020a17090a990300b0020a74d5486esi4999422pjp.21.2022.10.06.09.22.57; Thu, 06 Oct 2022 09:23:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="Gnc+f/P7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231648AbiJFQSY (ORCPT + 99 others); Thu, 6 Oct 2022 12:18:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231499AbiJFQSX (ORCPT ); Thu, 6 Oct 2022 12:18:23 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB24E88A09; Thu, 6 Oct 2022 09:18:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665073102; x=1696609102; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=IS9/8GZEIZjGTZSUozDDT7Qbp2bCtL4B2ZSEaLpZNYA=; b=Gnc+f/P7Wf3CK9GcO9dlvPNZmDYj+p6M5oK1IJL3n/l5M2BZ+KsGa1Aw ZsZloP6fxCg5C2PiyrAQ9vb7DQm4G5HuOA/9Cb1hxm3xbu/+VGF1v/E3b BHZpMGpe5u4U3edJxyiresKjgdNakpY2lR8VzrvSIAbv7fRkSsEeVDXou wXmA1CoWQaQSV2ZqyjoyNG55tP21Fy5rsHbHeShbUyqNWXE7C140tX8ri iRAktbQc0S0XDqEr2jAxfzAT+H2aJ0ilfwUlQhCAZIfXs7vOzzMHqoHwG xU66VYuSI4v/wq0PWo7DOGcIfYH8E6t6j8QEItHtFP9ywh0RK/rNOWDlY w==; X-IronPort-AV: E=McAfee;i="6500,9779,10492"; a="290752703" X-IronPort-AV: E=Sophos;i="5.95,164,1661842800"; d="scan'208";a="290752703" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2022 09:17:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10492"; a="953684392" X-IronPort-AV: E=Sophos;i="5.95,164,1661842800"; d="scan'208";a="953684392" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga005.fm.intel.com with ESMTP; 06 Oct 2022 09:17:41 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1ogTZ5-003Ehi-1q; Thu, 06 Oct 2022 19:17:39 +0300 Date: Thu, 6 Oct 2022 19:17:39 +0300 From: Andy Shevchenko To: Matti Vaittinen Cc: Matti Vaittinen , Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Jagath Jog J , Nikita Yushchenko , Cosmin Tanislav , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v2 1/5] regulator: Add devm helpers for get and enable Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 06, 2022 at 05:36:52PM +0300, Matti Vaittinen wrote: > A few regulator consumer drivers seem to be just getting a regulator, > enabling it and registering a devm-action to disable the regulator at > the driver detach and then forget about it. > > We can simplify this a bit by adding a devm-helper for this pattern. > Add devm_regulator_get_enable() and devm_regulator_get_enable_optional() ... > (cherry picked from commit b6058e052b842a19c8bb639798d8692cd0e7589f) Not sure: - why this is in the commit message - what it points to, since $ git show b6058e052b842a19c8bb639798d8692cd0e7589f fatal: bad object b6058e052b842a19c8bb639798d8692cd0e7589f > Already in Mark's regulator tree. Not to be merged. Included just for > the sake of the completeness. Will be dropped when series is rebased on > top of the 6.1-rc1 Ah, I see, but does it mean the commit has been rebased or you used wrong SHA? ... > +static void regulator_action_disable(void *d) > +{ > + struct regulator *r = (struct regulator *)d; Cast is not needed. > + regulator_disable(r); > +} -- With Best Regards, Andy Shevchenko