From patchwork Tue Dec 4 11:38:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Vaittinen, Matti" X-Patchwork-Id: 10711589 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 F22DD14BD for ; Tue, 4 Dec 2018 11:38:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E0E6B2B72C for ; Tue, 4 Dec 2018 11:38:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D42D52B763; Tue, 4 Dec 2018 11:38:34 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 873B42B72C for ; Tue, 4 Dec 2018 11:38:34 +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=S4z0qVCEppAPNm9Km2GpWN4oi37aen+nIdRjdjTMTx4=; b=ApQN8M+HvlmJGt kPNLHQ/maHZxAeK3qTGteokoh+fjrpKg7n3qX8WpdfwdOjhv8EXGZgNj85mLvdMz1ICWy+o5fmCew czxWa28VvjF+6Qa/9vYBpbtPyTUB5bUoEpvk3iCXmhrMpttTUIt0PJhNrT+ELMm0FdofLf39TWsjZ GFS+8od0BrnqPVFomgWUVkfBPv8fbjGa86R+EmwHsk4xDJkn84191/eAYDiJho9kBg160CWPiRPaH 0+SqfHPJ4HZPvifX/5WIzdJUxEfmAFkd2LJk+X0+7d6fLi/mjXrGAb1ifCLRxPVqJdaSzyH4RKyBh QtchdTjVsZwNaUNZoV1Q==; 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 1gU929-00039P-RO; Tue, 04 Dec 2018 11:38:33 +0000 Received: from mail-lj1-f193.google.com ([209.85.208.193]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gU923-00035v-LI for linux-arm-kernel@lists.infradead.org; Tue, 04 Dec 2018 11:38:31 +0000 Received: by mail-lj1-f193.google.com with SMTP id e5-v6so14603427lja.4 for ; Tue, 04 Dec 2018 03:38:17 -0800 (PST) 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=s0eoIBAlLdqa/lK+b31yZx/TLpcNisuF7h28Wa3I9ec=; b=NohyG44iqVPxcVAxuUhrTvIx3kGX+sHfSH7m0DJuuhkG3IvHccH/kDc+YJXma4LNBV QRq64ZfNNCRKT1CHeGcCf2Pk0ETseHV814KJOFvbL1vO0feZPFaXxWKpF7+XZPeWV76Y Zs7jyx0r7Z7o4lNgL1L2KLmSUBAOg2yYvv44S62BGEj5egy5GYeWeMpEmPrYUO1UQUIB PrvFA7pwlUVYXrDXH7vwqyeaWSwBvck8UpzsaPMbhVQz+JJrrTUbgd+jtdQOLyYGftOj JfIv5d9ZXdw/w28Bso91JFIMt8DY78yS5nLs2h42Kt/Cpm+ZajikW/ONhq3oh3flSRaF EXRQ== X-Gm-Message-State: AA+aEWbsqUECAQHFfrhpzDfMfyyLVZPSDRFlYo4FTt+BR8KmfltxHDjK D00+JJuWttLR0G6ZVGNIbu7Cw1t++YY= X-Google-Smtp-Source: AFSGD/Uvsg6v6MNTQzmy8FcIl7zel0Oo0WeO1tgPHUa42MfR8TPjKSMum2kB50pJjhclNHQStDf3VA== X-Received: by 2002:a2e:880a:: with SMTP id x10-v6mr13737293ljh.174.1543923495868; Tue, 04 Dec 2018 03:38:15 -0800 (PST) Received: from localhost.localdomain ([213.255.186.46]) by smtp.gmail.com with ESMTPSA id q21-v6sm3068085ljc.5.2018.12.04.03.38.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Dec 2018 03:38:15 -0800 (PST) Date: Tue, 4 Dec 2018 13:38:03 +0200 From: Matti Vaittinen To: mazziesaccount@gmail.com, matti.vaittinen@fi.rohmeurope.com Subject: [PATCH v6 07/10] 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-20181204_033827_805913_40E2639E X-CRM114-Status: GOOD ( 13.82 ) 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: david.brown@linaro.org, linux-clk@vger.kernel.org, b.zolnierkie@samsung.com, sboyd@kernel.org, linux-kernel@vger.kernel.org, mturquette@baylibre.com, rafael.j.wysocki@intel.com, linux-doc@vger.kernel.org, linux@armlinux.org.uk, krzk@kernel.org, akshu.agrawal@amd.com, cw00.choi@samsung.com, djkurtz@chromium.org, pavel@ucw.cz, pombredanne@nexb.com, andy.gross@linaro.org, andrew.smirnov@gmail.com, sjhuang@iluvatar.ai, 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..8d90bdf5b946 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_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", },