From patchwork Thu May 24 07:50:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilia Lin X-Patchwork-Id: 10423049 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E62386032A for ; Thu, 24 May 2018 07:52:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD3CB28FC9 for ; Thu, 24 May 2018 07:52:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D1A1E29213; Thu, 24 May 2018 07:52:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 839BE29220 for ; Thu, 24 May 2018 07:52:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965362AbeEXHwc (ORCPT ); Thu, 24 May 2018 03:52:32 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:52884 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965223AbeEXHuh (ORCPT ); Thu, 24 May 2018 03:50:37 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 47A2E60F5F; Thu, 24 May 2018 07:50:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527148236; bh=wQ/UNaNp6e46YpY1duJfmTZIKLj7TVgJO1JTJosiWgE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JbI/GR5TzVkphs14/sJgZWsS3WJ/kUZu1MUZKPbufTjy9NaPpnGjDiLGcVk0CrfT3 IuAD40V8nKbfaCqpI4K1UDlltovqAjyTFC629pu0KSsZHEb98brzaOhcEijljESA1S wNfRPle/9PmpZLITM3y9h7Sw4PIO7D/aW9pMC7dg= 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 35D0560C65; Thu, 24 May 2018 07:50:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527148235; bh=wQ/UNaNp6e46YpY1duJfmTZIKLj7TVgJO1JTJosiWgE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IIm3AXQJqvhmh+ihldRIsr4J4/nr4owv5j5ePuEJkFgFaAaLoxEl1cXAvMnZbnWR5 nlz/pTHleS9hDHvkmDUv7nsRiLm/xMUOzvyynK3btOOaRDmC25aHpZJf+o63a61O18 8RDsozNkdxaJgVWH8gSZPJDPsNAEN7Bgpdczh2F4= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 35D0560C65 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 v12 3/8] clk: Use devm_ in the register fixed factor clock Date: Thu, 24 May 2018 10:50:13 +0300 Message-Id: <1527148218-16540-4-git-send-email-ilialin@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1527148218-16540-1-git-send-email-ilialin@codeaurora.org> References: <1527148218-16540-1-git-send-email-ilialin@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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);