Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp804985imm; Wed, 23 May 2018 05:57:01 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq+mZPdG3X9S9xB4hwRXB6w9CZrwOId39cMB4HJc9cSEd0eb3oacWLfwGHk9EhLuaHeZsAO X-Received: by 2002:a17:902:24c7:: with SMTP id l7-v6mr2902940plg.327.1527080221016; Wed, 23 May 2018 05:57:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527080220; cv=none; d=google.com; s=arc-20160816; b=ju2oGQVPpc8woL53Z3SAOsApow2PWm9dI8u+2Zdb/7gBGjqT/l1tQGoW7TaJaNOCmB Zd0iTbkJFctk8oJgtKhBe0jm2V8nXao+GrsDWOgpzF+CVjqTR2S41YZ2b/e9mC/l7zn/ AYeULmhWpUn39hoyaQScUt0lY18Hn/12YNzBQnGVe46flKEG2FgFM+kl4qUD8b3dQOgx Ecvg2CNDYpqqcndOgECsWBVXIR+9qJiwr/HcB8AObf9my08Ptr3hZYruXV3vswnDASOs D+33BqFCfBnk//7kcKx7pcPzpoG98KUxgUCPTIZxnkwmT+PXqzwnRA38q1g2mdwrp0ST hXrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=1woFGo2V/s0FTc82HMl5MI3Z3dWGwPuHKnOawErQ7Fw=; b=q6t/Y0XxD0ogRg8VlwIINaWHVca0USwlOho3RejAzLaOFmJ8PtMp4ccki+j5JaO4S3 uZxSLuUePK0nKym9LkbDmMacoa0AqM8Bpg7HEEqehK01I+kMYVjbhJdjWMoouIPRKRxo zLKxvxkADwdKVr6wvBo4fkiFM2SAOb6/qGu+yKYvel2Kw+0pvOYAPpQ7O5shLOg+WLzi QV7eYXcXaA/aZ3FwXXK1o7BMI44y5hesjtwqetbr4j0W1EAxY/Pcg+JqcqjcAVY7yi8m c1MG5YRt0q1+/FLr0Rp6TytZdlgwCDlOnwe+EbKV1E7BvhgfxQPd/DwywPae9CzNfGlK hntw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=RDt0Lc2E; dkim=pass header.i=@codeaurora.org header.s=default header.b=KQz35OZc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x17-v6si19098749pfh.354.2018.05.23.05.56.46; Wed, 23 May 2018 05:57:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=RDt0Lc2E; dkim=pass header.i=@codeaurora.org header.s=default header.b=KQz35OZc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933051AbeEWMzH (ORCPT + 99 others); Wed, 23 May 2018 08:55:07 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:55058 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932089AbeEWMxU (ORCPT ); Wed, 23 May 2018 08:53:20 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 32B5760C54; Wed, 23 May 2018 12:53:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527079999; bh=wQ/UNaNp6e46YpY1duJfmTZIKLj7TVgJO1JTJosiWgE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RDt0Lc2EZTemE+T1AjE1/u82eg7A+S7C1tfINwhdGuqHO/seE9mse7K1aXkw9Z5r9 ObKIzd17CqK5EoOXaJzdgO1FaB7aUMSQktKaf1Off4H15Unemhsph3DDsg++iC/E46 zJ+EHeIXRt+NjHQ9zZH2eihfO2EMh3Jq0U6dold8= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from lx-ilial.mea.qualcomm.com (unknown [185.23.60.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: ilialin@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 7C5BD602BC; Wed, 23 May 2018 12:53:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527079997; bh=wQ/UNaNp6e46YpY1duJfmTZIKLj7TVgJO1JTJosiWgE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KQz35OZc2YWBGopqD0TYsqBpgkGPCPxQN6SnZlpzJBdTZYHhDiZnNZe3gP7bTzNtH t8aXEQa5xk58dZxGMOsb+OKme/hy516PmO/SXABKunrMpLB+GMEX0D5zfgHI6nVaiR J6qW4K96TbminMdeCY4soHCDvqDdGPRIM/36g+ho= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 7C5BD602BC Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=ilialin@codeaurora.org From: Ilia Lin To: mturquette@baylibre.com, sboyd@kernel.org, robh@kernel.org, mark.rutland@arm.com, andy.gross@linaro.org, david.brown@linaro.org, will.deacon@arm.com Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, vireshk@kernel.org, ilialin@codeaurora.org Subject: [PATCH v11 3/8] clk: Use devm_ in the register fixed factor clock Date: Wed, 23 May 2018 15:52:56 +0300 Message-Id: <1527079981-11179-4-git-send-email-ilialin@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1527079981-11179-1-git-send-email-ilialin@codeaurora.org> References: <1527079981-11179-1-git-send-email-ilialin@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_clk_hw_register instead of clk_hw_register to simplify the usage of this API. This way drivers that call the clk_hw_register_fixed_factor won't need to maintain a data structure for further cleanup. Signed-off-by: Ilia Lin --- drivers/clk/clk-fixed-factor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c index a5d402d..8e39bda 100644 --- a/drivers/clk/clk-fixed-factor.c +++ b/drivers/clk/clk-fixed-factor.c @@ -94,7 +94,7 @@ struct clk_hw *clk_hw_register_fixed_factor(struct device *dev, init.num_parents = 1; hw = &fix->hw; - ret = clk_hw_register(dev, hw); + ret = devm_clk_hw_register(dev, hw); if (ret) { kfree(fix); hw = ERR_PTR(ret); -- 1.9.1