From patchwork Thu Nov 1 07:20:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Vaittinen, Matti" X-Patchwork-Id: 10663617 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 A03D213A4 for ; Thu, 1 Nov 2018 07:21:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E7D82BA66 for ; Thu, 1 Nov 2018 07:21:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7C1832BC1B; Thu, 1 Nov 2018 07:21: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=-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 24EFA2BA66 for ; Thu, 1 Nov 2018 07:21:33 +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=RGdoiIedUVumv1VY5MsdWFk+o93J698sq4oreuyw+X8=; b=Ja1qv4l8eXrG4y XNl/f8SCmfejoSAstXJTeHJtu05H6G6Ol2v2PIB6bvS+h3NnjPRSz37jx685xie5GlC5BMM+BQS1p IpM2N4aNXFZwDojQ4pgJLsUcngewsB/tY7If/t8TPYCRuyhEqNFsHYfY8XAs94Y1aMTlzbx0CeEqJ jzcraqjLIpoG1p+Ai7wQgXCDnhlljgdfrzlC9kPKOUNaVGnNLVQmsOH1HBvZ7fE7shy2wqCRIo8G2 HpoBvLVKdvMXf7tPLGT7fXx/HNP+RNo5JFvhQNIZjlJtYsx/oS8m+F5mApCBhM4ZCZKSN7ljZo5an H9ArtpT+CnNGpqw5/Dpw==; 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 1gI7IJ-0008J6-A4; Thu, 01 Nov 2018 07:21:31 +0000 Received: from mail-lj1-f196.google.com ([209.85.208.196]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gI7I3-0007ww-Ee for linux-arm-kernel@lists.infradead.org; Thu, 01 Nov 2018 07:21:29 +0000 Received: by mail-lj1-f196.google.com with SMTP id k19-v6so8651076lji.11 for ; Thu, 01 Nov 2018 00:21:05 -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=JJ40AdSZPMkqm7Da3QKXJd/JQH4MrVzdTvQwG7toy0o=; b=ZhzCOSXyJMNMC1MkgnCD8YSp9nXyZbuFIf+ZyU7VsN7wMOEfEOPOtIfDx1l3YD1tM0 r4H8u03jtwSsqzeaSOB2nTXFWfVO2tKWSEclCPLxslWSMTZx1iACMrc8/X9ENJYnE7vI 27/W40q+YIuQd2CV1qu6I0zY5JDBOEaylLx6OGPvAMWgERqnV85M7Au6toxAv5ZObBSA qNFaWUgGCtWDwbhFK49U/ls+xS3VJBOgU0rxcOeEJWLRXay9+9rwIuNdTpTQJtpyxCfF NL60RqGxAlPNSWCmNuKMJsVe/76YsW3kUn7S5lzkUF+Ik/PS4QSFO1vooYM/6PeIrMGH hEIw== X-Gm-Message-State: AGRZ1gLDHYCIjnBvle0VYmKlwsUDVVKmLLpxDUhfnnYXNVXEuDvRvVEu SMNnclKhcTchY7GK2cuUkeY= X-Google-Smtp-Source: AJdET5cu+rRXC6h2rM7WDbSFA0lNTibQFCyHDMlVuURHX7Wicw5b9lFNL6eZGCZ8Xv0F44A35XLGNw== X-Received: by 2002:a2e:9059:: with SMTP id n25-v6mr1037215ljg.155.1541056863606; Thu, 01 Nov 2018 00:21:03 -0700 (PDT) Received: from localhost.localdomain ([213.255.186.46]) by smtp.gmail.com with ESMTPSA id d6-v6sm4442562lfk.83.2018.11.01.00.21.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 01 Nov 2018 00:21:03 -0700 (PDT) Date: Thu, 1 Nov 2018 09:20:49 +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 v2 6/8] clk: rk808: use managed version of of_provider registration Message-ID: <1a8f1bf8bc4fd3871ba8c87b4ea656d1dc2e870c.1541054985.git.matti.vaittinen@fi.rohmeurope.com> 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-20181101_002115_850645_956353F1 X-CRM114-Status: GOOD ( 15.71 ) 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", },