From patchwork Wed Jun 1 23:15:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 9148805 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 4AD2F600BC for ; Wed, 1 Jun 2016 23:27:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3CFF5263DC for ; Wed, 1 Jun 2016 23:27:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 31F1F2714C; Wed, 1 Jun 2016 23:27:13 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C0944263DC for ; Wed, 1 Jun 2016 23:27:12 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b8FVL-0001Yt-Vf; Wed, 01 Jun 2016 23:24:52 +0000 Received: from merlin.infradead.org ([205.233.59.134]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b8FSj-0005xB-9b for linux-arm-kernel@bombadil.infradead.org; Wed, 01 Jun 2016 23:22:09 +0000 Received: from mail-pa0-x234.google.com ([2607:f8b0:400e:c03::234]) by merlin.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1b8FNF-0007de-HK for linux-arm-kernel@lists.infradead.org; Wed, 01 Jun 2016 23:16:30 +0000 Received: by mail-pa0-x234.google.com with SMTP id bz2so516790pad.1 for ; Wed, 01 Jun 2016 16:16:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=pyd/k6aCWk61b15HmVkE6f/mTfkrkpNEi8CVHajaLxg=; b=cplAvMJSGsn9HmKRFgseWp42SZ6sRaS50Lt5PN+3Fl+140q5w0OS4xRdEls4tOxlQF 9F5BCB2+KxGaCu/J1XWATLWoGSa1C+KdDEwYSoRgBVFtUiTBZeuYb9IC/bF6+JPR1+kB Zso/dbapTFEzUkWCSAzON6TlhAyzoKvv7g9O4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pyd/k6aCWk61b15HmVkE6f/mTfkrkpNEi8CVHajaLxg=; b=iBvfynPdwTAaiuxUVXTCnVpczpX9UoIYczDa/Xg/vO8udLAuC+05uYJuBYm5MMeIzS AKxgJdgV94v/e8gTsirVZFSG6IzQy1S/uXaaSzZYIcZ94iGlYovOmBd21rgO7n7qx9q5 eYXRTKjWFnejxSipPSR8unQYQUuSmrHD4swftNpdw6mBDDrtiI4vwBVoP7qr6WM+Eupt Ye8b9jexGxgIhwRtO49/wFhM5fMocrMkhX050DzbrMoN2Qqyu0xQluQqgO2QHMd7WDtG fzPjB0CXIQjj4vn9bwOMlYBeRoBP6JxH5vXs9BvkwofFfaogaJLoAXNAbNF9ORl5vkAV ER0Q== X-Gm-Message-State: ALyK8tIzWFFMOJoUcwtMAkAK2iR56qAiB2xnwZ0gX2VdM2Ag0YySxyq0LDB/6cec3j0p8HlM X-Received: by 10.66.118.106 with SMTP id kl10mr1150336pab.78.1464822968081; Wed, 01 Jun 2016 16:16:08 -0700 (PDT) Received: from localhost.localdomain (pat_11.qualcomm.com. [192.35.156.11]) by smtp.gmail.com with ESMTPSA id r64sm20967395pfi.54.2016.06.01.16.16.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Jun 2016 16:16:07 -0700 (PDT) From: Stephen Boyd To: Michael Turquette , Stephen Boyd Subject: [PATCH 31/34] clk: twl6040: Migrate to clk_hw based registration APIs Date: Wed, 1 Jun 2016 16:15:30 -0700 Message-Id: <20160601231533.9354-32-stephen.boyd@linaro.org> X-Mailer: git-send-email 2.9.0-rc1 In-Reply-To: <20160601231533.9354-1-stephen.boyd@linaro.org> References: <20160601231533.9354-1-stephen.boyd@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160601_191629_659109_A8A3913B X-CRM114-Status: GOOD ( 12.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Now that we have clk_hw based provider APIs to register clks, we can get rid of struct clk pointers while registering clks in these drivers, allowing us to move closer to a clear split of consumer and provider clk APIs. Cc: Peter Ujfalusi Signed-off-by: Stephen Boyd --- See commit 58657d189a2f and it's children for details on this new registration API. drivers/clk/clk-twl6040.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clk/clk-twl6040.c b/drivers/clk/clk-twl6040.c index 697c66757400..8f4c1af5fb92 100644 --- a/drivers/clk/clk-twl6040.c +++ b/drivers/clk/clk-twl6040.c @@ -30,7 +30,6 @@ struct twl6040_clk { struct twl6040 *twl6040; struct device *dev; struct clk_hw mcpdm_fclk; - struct clk *clk; int enabled; }; @@ -80,6 +79,7 @@ static int twl6040_clk_probe(struct platform_device *pdev) { struct twl6040 *twl6040 = dev_get_drvdata(pdev->dev.parent); struct twl6040_clk *clkdata; + int ret; clkdata = devm_kzalloc(&pdev->dev, sizeof(*clkdata), GFP_KERNEL); if (!clkdata) @@ -89,9 +89,9 @@ static int twl6040_clk_probe(struct platform_device *pdev) clkdata->twl6040 = twl6040; clkdata->mcpdm_fclk.init = &wm831x_clkout_init; - clkdata->clk = devm_clk_register(&pdev->dev, &clkdata->mcpdm_fclk); - if (IS_ERR(clkdata->clk)) - return PTR_ERR(clkdata->clk); + ret = devm_clk_hw_register(&pdev->dev, &clkdata->mcpdm_fclk); + if (ret) + return ret; platform_set_drvdata(pdev, clkdata);