From patchwork Fri Nov 2 12:37:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Vaittinen, Matti" X-Patchwork-Id: 10665435 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 209C517D5 for ; Fri, 2 Nov 2018 12:37:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 095DE2B245 for ; Fri, 2 Nov 2018 12:37:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F17572B3D8; Fri, 2 Nov 2018 12:37:48 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9B2912B245 for ; Fri, 2 Nov 2018 12:37:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=u4NgRMFJFa0TfBza8StczUhLEE0Y2X4iOZYPVqRRx4A=; b=rbaUZMEG5DzrxS FPwa822LkVAUoymlP4Eer9O+fW1X6haIlpBQUV3siKqMqtXnCGFZ7WgH3ncJ0qyyTvTiKUkFth5dH oJ0j0aM1PkAl2c6VnZze15ZrIhyT2OmuY9UTTOkhqRmMl8EtbZbvJ3ovzLeIwPxZ1/QN24QIMLx8W pEUOEKYUEoVtT1bm/vyUFs7j5NZMvijWWQwJWcMz008vpwbLz1KksV5oSBMEw1oTpxxuLG9dUG/0t mTcGCM9fkjBZImiLmS2QtvR/LLHwuytP+q7inhi29kYiyrSg4iK8jirComwl9/IaxHvJuAJ3ymzs8 7VDEkCqg7ViTD+mOrPwA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIYhv-0001Nk-1j; Fri, 02 Nov 2018 12:37:47 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIYhs-0001LH-TG for linux-arm-kernel@bombadil.infradead.org; Fri, 02 Nov 2018 12:37:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=4b7mWWvbRMSl/BrY6BXSv/3823MeAc6TDJ2DxbTG2QU=; b=aar7YaEkfq3CNKNMiaTgZOjWh E6ueNu2s1h/U9HPWeLDf9jeI3c2gBrDDjbhRh2LaAqWybCVDFIrEdkZLj5r5xqgtY/cqhA89NoDgP gTMgMJ8xBfL54K2yCnNqZCMgVu5e9x2PQyizGiAs0YPMHS9oB4WZ3Bz/Q3m3rm79ywRDhJ4s9LGh9 fnAB+dZpU4Izf9LjCvPX9GTYzhM5tXa4VrJk6PV4r4cPbNbwCXu7BzO12y1xaBtKErqtHpVOifmO4 f64HqBFXS/hgV2R202bYo0L/tknhdB75HHomg7fIYdK4yAmg4psbUjkhIYjrSb1eJTb8wRPHAoJIB K8i+10Y0A==; Received: from mail-lf1-f66.google.com ([209.85.167.66]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIYho-0002NC-7g for linux-arm-kernel@lists.infradead.org; Fri, 02 Nov 2018 12:37:43 +0000 Received: by mail-lf1-f66.google.com with SMTP id d7-v6so1240693lfi.2 for ; Fri, 02 Nov 2018 05:37:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=4b7mWWvbRMSl/BrY6BXSv/3823MeAc6TDJ2DxbTG2QU=; b=Q8bkA60yzpXcf4svqzRGdkYRI92vK8+AyuOXw719N6qb+GdqLpvelw3P/6LNh5uhQ+ e4WtGPNNvk0DYaXYGIQRvdCo66T1kHLaLJfrYqq3wah2tVlLV3g4zE8WtHI9GPCMbVuf jrUVMrmAlsd2DLllFo72wefHb0aRd2ZFB6vPHYEsCPYIeE1ouD/EibEqMhj+uS6Xlerf e8sj09iQ7z11+As9wqZANOk3PMmwZ7AENA8/iaQpXDkC8S0/cvqkT+0wqnYDWSyqLiCI idP/810S+dgXk2gSpyGKSGqZFf9GSaxzOKPpOus9Ai/EhbmNGzUbwvmWZlByMZG0wYd4 k89A== X-Gm-Message-State: AGRZ1gItQr5WxJV1ErUJI10Pg037Q351tWZHKpXyE20SD1MW8/WEuj5V u2xwRmUPnHka7cnkD7dc1hw= X-Google-Smtp-Source: AJdET5ey2hQGFTMu+Rc2Rtu+S/newd6zf17RtA9SMIAuBBhpOQg4DfiVCl26dLZMvX6mlbt7D/wc7w== X-Received: by 2002:a19:c396:: with SMTP id t144mr6633017lff.110.1541162248798; Fri, 02 Nov 2018 05:37:28 -0700 (PDT) Received: from localhost.localdomain ([213.255.186.46]) by smtp.gmail.com with ESMTPSA id a9sm2639656lfi.57.2018.11.02.05.37.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 Nov 2018 05:37:28 -0700 (PDT) Date: Fri, 2 Nov 2018 14:37:14 +0200 From: Matti Vaittinen To: Jonathan Corbet , Michael Turquette , Stephen Boyd , Chanwoo Choi , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Russell King , Andy Gross , David Brown , Kukjin Kim , Sylwester Nawrocki , Tomasz Figa , Andrey Smirnov , Sebastian Reichel , Guenter Roeck , Rob Herring , Matti Vaittinen , Huang Shijie , Akshu Agrawal , "Rafael J. Wysocki" , Daniel Kurtz , mazziesaccount@gmail.com Subject: [PATCH v3 5/7] clk: rk808: use managed version of of_provider registration Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181102_123740_366437_82B0FC92 X-CRM114-Status: GOOD ( 18.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-samsung-soc@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-msm@vger.kernel.org, matti.vaittinen@fi.rohmeurope.com, linux-kernel@vger.kernel.org, linux-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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 Simplify clean-up for rk808 by using managed version of of_provider registration. Signed-off-by: Matti Vaittinen --- drivers/clk/clk-rk808.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/clk/clk-rk808.c b/drivers/clk/clk-rk808.c index 6461f2820a5b..177340edaae5 100644 --- a/drivers/clk/clk-rk808.c +++ b/drivers/clk/clk-rk808.c @@ -138,23 +138,12 @@ static int rk808_clkout_probe(struct platform_device *pdev) if (ret) return ret; - return of_clk_add_hw_provider(node, of_clk_rk808_get, rk808_clkout); -} - -static int rk808_clkout_remove(struct platform_device *pdev) -{ - struct rk808 *rk808 = dev_get_drvdata(pdev->dev.parent); - struct i2c_client *client = rk808->i2c; - struct device_node *node = client->dev.of_node; - - of_clk_del_provider(node); - - return 0; + return devm_of_clk_add_parent_hw_provider(&pdev->dev, + of_clk_rk808_get, rk808_clkout); } static struct platform_driver rk808_clkout_driver = { .probe = rk808_clkout_probe, - .remove = rk808_clkout_remove, .driver = { .name = "rk808-clkout", },