From patchwork Wed Oct 31 08:33:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Vaittinen, Matti" X-Patchwork-Id: 10662193 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 EAF4414E2 for ; Wed, 31 Oct 2018 08:33:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D55F82A317 for ; Wed, 31 Oct 2018 08:33:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C90672A338; Wed, 31 Oct 2018 08:33:59 +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 799EC2A32E for ; Wed, 31 Oct 2018 08:33:59 +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=V5M8Hl0Qbu+z/m 8GmYZv0e8K622xaxYyKI1bvf2u1+988OgFemiUrAHpYa4H9XyBO6h7KZ6w7IGMs10wd+Ooyw2bieu 9fdrKhEvzTfzlcONj2SkJR6/jkIluTQcA6W4rQXEmX+UMXAC7PXHnSL0kubbmV3vDkU1KGZQHw1VQ ehbFIgn7xjV8ogi7lT+wcEBN56N3O8pVwyqw6U9U10b2h/U5VTYGS9n6kDmhofJCPiVVK7RW4WD5J Okmhc8+KMzHacRjhwuYiDI9d9eVssGuYbt5+DRxNZk4EwTqPtSTuZJiu0jWD14juNbpQZ/FMmrRzG VDOArWnp1kBLEZB++7eA==; 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 1gHlwr-0007mX-H4; Wed, 31 Oct 2018 08:33:57 +0000 Received: from mail-lj1-f195.google.com ([209.85.208.195]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gHlwn-0007kA-Jd for linux-arm-kernel@lists.infradead.org; Wed, 31 Oct 2018 08:33:56 +0000 Received: by mail-lj1-f195.google.com with SMTP id z21-v6so14018568ljz.0 for ; Wed, 31 Oct 2018 01:33:43 -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=NUsdpVWWKlSC7pJBKh32jmGHbb4GKDnTgP6in+flQ9+d82TrpaPPWcw6R+2dy6w2Df Au9NHrk4GunNxKQ1MHKn6mHSoELgEX6FILUp6mSRL0cjlb+o7hqjkT23/FvUYwRkWZle kJFn8ht5NlVH9boprqSvRnvhPYmPb0Q48ea/GWgotq5IT/94Pt4GVTdV2JkOH5UmzY/Y FLsw0YDwcJNNxpbnSC70S8XhPXBCb47QmzBAAuGCC2ylVEpvMaYrbCXBl/gDNvxu03rD erzg9o9A+qEp6EeEdZ5twq1cHzzIVlbP2toFEAcu9G+PNUtfgwsNaM7/b1ch5W4C85kV 8dQg== X-Gm-Message-State: AGRZ1gLRKW2xujzm7eH44qLHh3FCQhXhThIrNOSU2HeNyqBHJn1BqTx2 8Bk+ywoPat5sz2MsKJy6cF0= X-Google-Smtp-Source: AJdET5cjdgLBrCJqgFZ2mzt6ED/HOT3OWL2hbdn1z1omeguTTDhoP10SZv8fOZFL0V7HG0nmTYiGdw== X-Received: by 2002:a2e:9445:: with SMTP id o5-v6mr1480858ljh.7.1540974822030; Wed, 31 Oct 2018 01:33:42 -0700 (PDT) Received: from localhost.localdomain ([213.255.186.46]) by smtp.gmail.com with ESMTPSA id j20sm1313575lfg.69.2018.10.31.01.33.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 01:33:41 -0700 (PDT) Date: Wed, 31 Oct 2018 10:33:23 +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 6/8] 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-20181031_013353_731331_FEE6081D X-CRM114-Status: GOOD ( 15.16 ) 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", },