From patchwork Mon Apr 10 01:44:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 13206067 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CFB78C77B61 for ; Mon, 10 Apr 2023 02:27:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229713AbjDJC1r (ORCPT ); Sun, 9 Apr 2023 22:27:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229704AbjDJC1q (ORCPT ); Sun, 9 Apr 2023 22:27:46 -0400 Received: from www381.your-server.de (www381.your-server.de [78.46.137.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA1D83581 for ; Sun, 9 Apr 2023 19:27:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metafoo.de; s=default2002; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=y3JJ0JzUuuqhIhC4F7ewIguKeNISh63HKSCT4u/l5NQ=; b=m9wlB85PBF8qnR1IPZELgQ1Gr9 NFrjafINILVk5OFgGQ9rL36BFz5cmrH55IH1lt1kjv/ZiPMqhJbnf8Q0p2SGk2xwc1y/BZhNYxSat 1EfHYKqNkFJZbRisHu+Jh3V5SpzKfhf4RSJgoWiN1mFPTSsRu3s7VQmPUJ4Z2aHyXdP6wIhKNco7S shHRPu6XD3zKErONdTHmpaof/fmzVxBoJwHU66bMq+vM15DDDe4z76AaTqFtfED7jp5RVAjlnFQ08 fpPHWqS68LMc2dgBVOgSZ8aHbRjyFMU/cly0zowT8FSs2xQzmPW62VF/zN7jtViFVuUi21q+ttxQN 5sh2n1XA==; Received: from sslproxy04.your-server.de ([78.46.152.42]) by www381.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1plgb5-0002QN-OJ; Mon, 10 Apr 2023 03:45:31 +0200 Received: from [2604:5500:c0e5:eb00:da5e:d3ff:feff:933b] (helo=lars-desktop.lan) by sslproxy04.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1plgb5-000EJ6-2L; Mon, 10 Apr 2023 03:45:31 +0200 From: Lars-Peter Clausen To: Michael Turquette , Stephen Boyd Cc: Eugeniy Paltsev , Mike Looijmans , Max Filippov , Bjorn Andersson , Kunihiko Hayashi , Masami Hiramatsu , Sebastian Hesselbarth , linux-clk@vger.kernel.org, Lars-Peter Clausen Subject: [PATCH 01/11] clk: axi-clkgen: Use managed `of_clk_add_hw_provider()` Date: Sun, 9 Apr 2023 18:44:52 -0700 Message-Id: <20230410014502.27929-1-lars@metafoo.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.103.8/26870/Sun Apr 9 09:25:02 2023) Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Use the managed `devm_of_clk_add_hw_provider()` instead of `of_clk_add_hw_provider()`. This makes sure the provider gets automatically removed on unbind and allows to completely eliminate the drivers `remove()` callback. Signed-off-by: Lars-Peter Clausen --- Sorry if you received this multiple times. Forgot to cc the mailinglist. --- drivers/clk/clk-axi-clkgen.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/clk/clk-axi-clkgen.c b/drivers/clk/clk-axi-clkgen.c index 671bee55ceb3..a04a3d38c76e 100644 --- a/drivers/clk/clk-axi-clkgen.c +++ b/drivers/clk/clk-axi-clkgen.c @@ -553,13 +553,8 @@ static int axi_clkgen_probe(struct platform_device *pdev) if (ret) return ret; - return of_clk_add_hw_provider(pdev->dev.of_node, of_clk_hw_simple_get, - &axi_clkgen->clk_hw); -} - -static void axi_clkgen_remove(struct platform_device *pdev) -{ - of_clk_del_provider(pdev->dev.of_node); + return devm_of_clk_add_hw_provider(&pdev->dev, of_clk_hw_simple_get, + &axi_clkgen->clk_hw); } static const struct of_device_id axi_clkgen_ids[] = { @@ -581,7 +576,6 @@ static struct platform_driver axi_clkgen_driver = { .of_match_table = axi_clkgen_ids, }, .probe = axi_clkgen_probe, - .remove_new = axi_clkgen_remove, }; module_platform_driver(axi_clkgen_driver); From patchwork Mon Apr 10 01:44:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 13206071 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C0B8C77B6E for ; Mon, 10 Apr 2023 02:28:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229726AbjDJC2a (ORCPT ); Sun, 9 Apr 2023 22:28:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229716AbjDJC2a (ORCPT ); Sun, 9 Apr 2023 22:28:30 -0400 Received: from www381.your-server.de (www381.your-server.de [78.46.137.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EED9F2707 for ; Sun, 9 Apr 2023 19:28:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metafoo.de; s=default2002; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID; bh=4k8OCgcWnKrwJSAtm+LV3Y85i/5OU3HN3IdC4aa+VWM=; b=Y4VG3Mm8CceOto/d26gmh97J4y 1KNIUX2WxRYVOcq7KkP3dBISAeqjcsJt6AbyX3rSlpTVLxGdvXl/Yr1epRo4vKcNcwDbUM4kodVIV Lza55tFs4ohKPpxiZzv7wgQhe8kDr33qHfQrZdgFRwhLjtFUkQSoPNLcXaQU3IPMhfGbHIJBqnfs8 6AZQBeLL1rS7se7IONdGs9r1BvV7ZveZ8ECNWLWNIDWpz6YPnsUfyJQ26+CyR3mrWezSCLTjeb1Ro IsPlUTNrgEvwLvMSd0uQXyEepQimXq9KQrXZlx+1Pl5uzycChbm0zcFsQe0gjavT7Ig21BfJOPHQw vD0jq+fQ==; Received: from sslproxy04.your-server.de ([78.46.152.42]) by www381.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1plgb8-0002Qc-10; Mon, 10 Apr 2023 03:45:34 +0200 Received: from [2604:5500:c0e5:eb00:da5e:d3ff:feff:933b] (helo=lars-desktop.lan) by sslproxy04.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1plgb7-000EJ6-Dj; Mon, 10 Apr 2023 03:45:33 +0200 From: Lars-Peter Clausen To: Michael Turquette , Stephen Boyd Cc: Eugeniy Paltsev , Mike Looijmans , Max Filippov , Bjorn Andersson , Kunihiko Hayashi , Masami Hiramatsu , Sebastian Hesselbarth , linux-clk@vger.kernel.org, Lars-Peter Clausen Subject: [PATCH 02/11] clk: axm5516: Use managed `of_clk_add_hw_provider()` Date: Sun, 9 Apr 2023 18:44:53 -0700 Message-Id: <20230410014502.27929-2-lars@metafoo.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230410014502.27929-1-lars@metafoo.de> References: <20230410014502.27929-1-lars@metafoo.de> MIME-Version: 1.0 X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.103.8/26870/Sun Apr 9 09:25:02 2023) Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Use the managed `devm_of_clk_add_hw_provider()` instead of `of_clk_add_hw_provider()`. This makes sure the provider gets automatically removed on unbind and allows to completely eliminate the drivers `remove()` callback. Signed-off-by: Lars-Peter Clausen --- drivers/clk/clk-axm5516.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/clk/clk-axm5516.c b/drivers/clk/clk-axm5516.c index 1dff2017ad9d..1afcfdf2e6f9 100644 --- a/drivers/clk/clk-axm5516.c +++ b/drivers/clk/clk-axm5516.c @@ -569,17 +569,11 @@ static int axmclk_probe(struct platform_device *pdev) return ret; } - return of_clk_add_hw_provider(dev->of_node, of_clk_axmclk_get, NULL); -} - -static void axmclk_remove(struct platform_device *pdev) -{ - of_clk_del_provider(pdev->dev.of_node); + return devm_of_clk_add_hw_provider(dev, of_clk_axmclk_get, NULL); } static struct platform_driver axmclk_driver = { .probe = axmclk_probe, - .remove_new = axmclk_remove, .driver = { .name = "clk-axm5516", .of_match_table = axmclk_match_table, From patchwork Mon Apr 10 01:44:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 13206073 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2190DC77B61 for ; Mon, 10 Apr 2023 02:28:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229728AbjDJC26 (ORCPT ); Sun, 9 Apr 2023 22:28:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229716AbjDJC26 (ORCPT ); Sun, 9 Apr 2023 22:28:58 -0400 Received: from www381.your-server.de (www381.your-server.de [78.46.137.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4239E3581 for ; Sun, 9 Apr 2023 19:28:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metafoo.de; s=default2002; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID; bh=H+4adBPnvxRXDnyFZpFi8k2LLSpZvK2cahm7QsRNgVI=; b=V4EMltQb8E1CUOjKOSsJJbs3Dd 9p+1JB7HJubnb0GN0DLrNKisfxHq85/Kq7JoxhenL59eTCcvEvdPQr6o3dSAFh5WIzFY808oqBJSb QDkRwlM1j46UbmqGkL1TSp29eMsPVjW0zCafQ2hIoKoSzOgW199X/LLBZEtWSxAt2+GbhSlMQeaq3 3YlxauhOIvNUgOu5OyRW442CUWo6QfZQvNSZkNm4Rmy/dzipRIjPLfuxVpSYaCugFoGwTN8Fq83uy 8M6VbkI8fvY01qFTdCtDXPDYTel0oopV+wHvmNJn4e076Ki6xNlVXnmM5DER0nVsoZlLwVGxf3v8F qYxpCQ+Q==; Received: from sslproxy04.your-server.de ([78.46.152.42]) by www381.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1plgbA-0002Qi-CI; Mon, 10 Apr 2023 03:45:36 +0200 Received: from [2604:5500:c0e5:eb00:da5e:d3ff:feff:933b] (helo=lars-desktop.lan) by sslproxy04.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1plgb9-000EJ6-PA; Mon, 10 Apr 2023 03:45:36 +0200 From: Lars-Peter Clausen To: Michael Turquette , Stephen Boyd Cc: Eugeniy Paltsev , Mike Looijmans , Max Filippov , Bjorn Andersson , Kunihiko Hayashi , Masami Hiramatsu , Sebastian Hesselbarth , linux-clk@vger.kernel.org, Lars-Peter Clausen Subject: [PATCH 03/11] clk: axs10x: Use managed `of_clk_add_hw_provider()` Date: Sun, 9 Apr 2023 18:44:54 -0700 Message-Id: <20230410014502.27929-3-lars@metafoo.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230410014502.27929-1-lars@metafoo.de> References: <20230410014502.27929-1-lars@metafoo.de> MIME-Version: 1.0 X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.103.8/26870/Sun Apr 9 09:25:02 2023) Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Use the managed `devm_of_clk_add_hw_provider()` instead of `of_clk_add_hw_provider()`. This makes sure the provider gets automatically removed on unbind and allows to completely eliminate the drivers `remove()` callback. Signed-off-by: Lars-Peter Clausen --- drivers/clk/axs10x/pll_clock.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/clk/axs10x/pll_clock.c b/drivers/clk/axs10x/pll_clock.c index dbbfa12e530d..242bf5d75bab 100644 --- a/drivers/clk/axs10x/pll_clock.c +++ b/drivers/clk/axs10x/pll_clock.c @@ -253,13 +253,8 @@ static int axs10x_pll_clk_probe(struct platform_device *pdev) return ret; } - return of_clk_add_hw_provider(dev->of_node, of_clk_hw_simple_get, - &pll_clk->hw); -} - -static void axs10x_pll_clk_remove(struct platform_device *pdev) -{ - of_clk_del_provider(pdev->dev.of_node); + return devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, + &pll_clk->hw); } static void __init of_axs10x_pll_clk_setup(struct device_node *node) @@ -331,7 +326,6 @@ static struct platform_driver axs10x_pll_clk_driver = { .of_match_table = axs10x_pll_clk_id, }, .probe = axs10x_pll_clk_probe, - .remove_new = axs10x_pll_clk_remove, }; builtin_platform_driver(axs10x_pll_clk_driver); From patchwork Mon Apr 10 01:44:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 13206078 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2BBBDC77B61 for ; Mon, 10 Apr 2023 02:29:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229732AbjDJC3d (ORCPT ); Sun, 9 Apr 2023 22:29:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229716AbjDJC3c (ORCPT ); Sun, 9 Apr 2023 22:29:32 -0400 Received: from www381.your-server.de (www381.your-server.de [78.46.137.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAA222707 for ; Sun, 9 Apr 2023 19:29:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metafoo.de; s=default2002; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID; bh=P2ytClwWS6+nU1uzBbgjEyN/lfcPDV2AzQGJ53LURtY=; b=FHKQ35rgIoDsWhNmOWsQRMvIaw LtBxYsDIqGj75zXWbo2O4RvYXufhSjQTsrTB9qxSQQb0KcNukOjbtQsmXj6WbSV/RDues/SebIiN1 PFxr8wTHGxOpi+nD12LVajUvOdd2cbCMA34PYVZQW2Aj3oyW+o2HoWNVgxWGpdVHJYOE7TlrCHEMy 8mnCrhu9ga+USd9gY6IDYBgdN6d4Mmck8ywOA7S6VK5ko71o84WVNizmvtOkQz0sZ7DHQlabXdSWi n/IQERo2hpUU8MqKUjr8UJZZEHnIjL4Qt8+AEwpSp5Erk00SHKhGru1KK0bJJ3J46VrZgWBHPb4oP cM2o2igw==; Received: from sslproxy04.your-server.de ([78.46.152.42]) by www381.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1plgbC-0002Qq-O7; Mon, 10 Apr 2023 03:45:38 +0200 Received: from [2604:5500:c0e5:eb00:da5e:d3ff:feff:933b] (helo=lars-desktop.lan) by sslproxy04.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1plgbC-000EJ6-4I; Mon, 10 Apr 2023 03:45:38 +0200 From: Lars-Peter Clausen To: Michael Turquette , Stephen Boyd Cc: Eugeniy Paltsev , Mike Looijmans , Max Filippov , Bjorn Andersson , Kunihiko Hayashi , Masami Hiramatsu , Sebastian Hesselbarth , linux-clk@vger.kernel.org, Lars-Peter Clausen Subject: [PATCH 04/11] clk: cdce706: Use managed `of_clk_add_hw_provider()` Date: Sun, 9 Apr 2023 18:44:55 -0700 Message-Id: <20230410014502.27929-4-lars@metafoo.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230410014502.27929-1-lars@metafoo.de> References: <20230410014502.27929-1-lars@metafoo.de> MIME-Version: 1.0 X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.103.8/26870/Sun Apr 9 09:25:02 2023) Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Use the managed `devm_of_clk_add_hw_provider()` instead of `of_clk_add_hw_provider()`. This makes sure the provider gets automatically removed on unbind and allows to completely eliminate the drivers `remove()` callback. Signed-off-by: Lars-Peter Clausen --- drivers/clk/clk-cdce706.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/clk/clk-cdce706.c b/drivers/clk/clk-cdce706.c index 1449d0537674..d8bee8180a6b 100644 --- a/drivers/clk/clk-cdce706.c +++ b/drivers/clk/clk-cdce706.c @@ -661,16 +661,10 @@ static int cdce706_probe(struct i2c_client *client) ret = cdce706_register_clkouts(cdce); if (ret < 0) return ret; - return of_clk_add_hw_provider(client->dev.of_node, of_clk_cdce_get, - cdce); + return devm_of_clk_add_hw_provider(&client->dev, of_clk_cdce_get, + cdce); } -static void cdce706_remove(struct i2c_client *client) -{ - of_clk_del_provider(client->dev.of_node); -} - - #ifdef CONFIG_OF static const struct of_device_id cdce706_dt_match[] = { { .compatible = "ti,cdce706" }, @@ -691,7 +685,6 @@ static struct i2c_driver cdce706_i2c_driver = { .of_match_table = of_match_ptr(cdce706_dt_match), }, .probe_new = cdce706_probe, - .remove = cdce706_remove, .id_table = cdce706_id, }; module_i2c_driver(cdce706_i2c_driver); From patchwork Mon Apr 10 01:44:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 13206069 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A491C77B61 for ; Mon, 10 Apr 2023 02:28:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229704AbjDJC2H (ORCPT ); Sun, 9 Apr 2023 22:28:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229716AbjDJC2G (ORCPT ); Sun, 9 Apr 2023 22:28:06 -0400 Received: from www381.your-server.de (www381.your-server.de [78.46.137.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B6DA269A for ; Sun, 9 Apr 2023 19:28:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metafoo.de; s=default2002; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID; bh=mIjkrk724YD/HXZW413oauwHdopAvLJKM812ASmnn4E=; b=WoLwHqt7CH4bupj7HlkHpRbEJl GLFm3l6AQZSwq+/ud5l8M2lcE1SSBTGvP/mU+7CaJHVYtQ8q+B5huThdaH5LCHWk+x0io2KpKIiSe ZdqjbIDn9PqBUjGWkhVBb7v15Dig6ODCbe1iLRqCYCBuXyPPQtN4PGS3rhKgqmHmAMxwyNqmEu+ZI bXOQkcUvXpRQRINyHIj1eF0FP5nbkDmVlrCEkfYYqJU6cpjNd5kthOhtxBqUqHnDy4TozUxDZd6aa qA0yIYrHXmhPkGvn8nSD9JE6EGJ6jJaD6tOAe5MW8yYh/aHcIxeGhjlk0+L5bf7ZKhrk9lRVMMSdf Co45/JbQ==; Received: from sslproxy04.your-server.de ([78.46.152.42]) by www381.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1plgbF-0002R8-4X; Mon, 10 Apr 2023 03:45:41 +0200 Received: from [2604:5500:c0e5:eb00:da5e:d3ff:feff:933b] (helo=lars-desktop.lan) by sslproxy04.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1plgbE-000EJ6-Fi; Mon, 10 Apr 2023 03:45:40 +0200 From: Lars-Peter Clausen To: Michael Turquette , Stephen Boyd Cc: Eugeniy Paltsev , Mike Looijmans , Max Filippov , Bjorn Andersson , Kunihiko Hayashi , Masami Hiramatsu , Sebastian Hesselbarth , linux-clk@vger.kernel.org, Lars-Peter Clausen Subject: [PATCH 05/11] clk: hsdk-pll: Use managed `of_clk_add_hw_provider()` Date: Sun, 9 Apr 2023 18:44:56 -0700 Message-Id: <20230410014502.27929-5-lars@metafoo.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230410014502.27929-1-lars@metafoo.de> References: <20230410014502.27929-1-lars@metafoo.de> MIME-Version: 1.0 X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.103.8/26870/Sun Apr 9 09:25:02 2023) Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Use the managed `devm_of_clk_add_hw_provider()` instead of `of_clk_add_hw_provider()`. This makes sure the provider gets automatically removed on unbind and allows to completely eliminate the drivers `remove()` callback. Signed-off-by: Lars-Peter Clausen --- drivers/clk/clk-hsdk-pll.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/clk/clk-hsdk-pll.c b/drivers/clk/clk-hsdk-pll.c index 766e139972fe..33b48ea5ea3d 100644 --- a/drivers/clk/clk-hsdk-pll.c +++ b/drivers/clk/clk-hsdk-pll.c @@ -346,13 +346,8 @@ static int hsdk_pll_clk_probe(struct platform_device *pdev) return ret; } - return of_clk_add_hw_provider(dev->of_node, of_clk_hw_simple_get, - &pll_clk->hw); -} - -static void hsdk_pll_clk_remove(struct platform_device *pdev) -{ - of_clk_del_provider(pdev->dev.of_node); + return devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, + &pll_clk->hw); } static void __init of_hsdk_pll_clk_setup(struct device_node *node) @@ -431,6 +426,5 @@ static struct platform_driver hsdk_pll_clk_driver = { .of_match_table = hsdk_pll_clk_id, }, .probe = hsdk_pll_clk_probe, - .remove_new = hsdk_pll_clk_remove, }; builtin_platform_driver(hsdk_pll_clk_driver); From patchwork Mon Apr 10 01:44:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 13206072 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D3A7C77B6E for ; Mon, 10 Apr 2023 02:28:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229727AbjDJC2o (ORCPT ); Sun, 9 Apr 2023 22:28:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229716AbjDJC2n (ORCPT ); Sun, 9 Apr 2023 22:28:43 -0400 Received: from www381.your-server.de (www381.your-server.de [78.46.137.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C8E82707 for ; Sun, 9 Apr 2023 19:28:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metafoo.de; s=default2002; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID; bh=G0V3U0998TVqR3tc0CCyhvwPc8WLgBtTHLL57EMnumM=; b=F0NFHoIVWh5YYkR48yRMysOtxX 6rXKSiYPzNj/S+MdWHE3rEbGTwyVSzXLqSsCsWi9q4Z+wPrIyafgAlyzZqFtRrR2mtiWf2ZchZ0MB H9IeabnGMHogd2vOMhjxszx+ldJfX9NRMQ9zR0bk9GusqNE44xr8Vv9AvyI34/C518AzTrgX9x82t 8x+UqgI3B99P7dZUkqJIDrLd7gHCOV4ZfCt70A3AVTZMSB8Xj28y9iPug+Z3pnHLG3PKVDmZOZXng k4esRFuvN8R7qtaZxzpjzIDzfSimdG1/Ni3edrHvas3ItFufkEXEXz0yn1dIXY5cZvbb6joDpufQu PJ+xSqRA==; Received: from sslproxy04.your-server.de ([78.46.152.42]) by www381.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1plgbH-0002RO-Ev; Mon, 10 Apr 2023 03:45:43 +0200 Received: from [2604:5500:c0e5:eb00:da5e:d3ff:feff:933b] (helo=lars-desktop.lan) by sslproxy04.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1plgbG-000EJ6-R9; Mon, 10 Apr 2023 03:45:43 +0200 From: Lars-Peter Clausen To: Michael Turquette , Stephen Boyd Cc: Eugeniy Paltsev , Mike Looijmans , Max Filippov , Bjorn Andersson , Kunihiko Hayashi , Masami Hiramatsu , Sebastian Hesselbarth , linux-clk@vger.kernel.org, Lars-Peter Clausen Subject: [PATCH 06/11] clk: lmk04832: Use managed `of_clk_add_hw_provider()` Date: Sun, 9 Apr 2023 18:44:57 -0700 Message-Id: <20230410014502.27929-6-lars@metafoo.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230410014502.27929-1-lars@metafoo.de> References: <20230410014502.27929-1-lars@metafoo.de> MIME-Version: 1.0 X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.103.8/26870/Sun Apr 9 09:25:02 2023) Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Use the managed `devm_of_clk_add_hw_provider()` instead of `of_clk_add_hw_provider()`. This makes sure the provider gets automatically removed on unbind. Signed-off-by: Lars-Peter Clausen --- drivers/clk/clk-lmk04832.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/clk/clk-lmk04832.c b/drivers/clk/clk-lmk04832.c index 57485356de4c..afdfee3b365f 100644 --- a/drivers/clk/clk-lmk04832.c +++ b/drivers/clk/clk-lmk04832.c @@ -1522,8 +1522,8 @@ static int lmk04832_probe(struct spi_device *spi) } lmk->clk_data->num = info->num_channels; - ret = of_clk_add_hw_provider(lmk->dev->of_node, of_clk_hw_onecell_get, - lmk->clk_data); + ret = devm_of_clk_add_hw_provider(lmk->dev, of_clk_hw_onecell_get, + lmk->clk_data); if (ret) { dev_err(lmk->dev, "failed to add provider (%d)\n", ret); goto err_disable_vco; @@ -1547,7 +1547,6 @@ static void lmk04832_remove(struct spi_device *spi) struct lmk04832 *lmk = spi_get_drvdata(spi); clk_disable_unprepare(lmk->oscin); - of_clk_del_provider(spi->dev.of_node); } static const struct spi_device_id lmk04832_id[] = { From patchwork Mon Apr 10 01:44:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 13206070 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0558EC77B61 for ; Mon, 10 Apr 2023 02:28:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229725AbjDJC2X (ORCPT ); Sun, 9 Apr 2023 22:28:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229716AbjDJC2W (ORCPT ); Sun, 9 Apr 2023 22:28:22 -0400 Received: from www381.your-server.de (www381.your-server.de [78.46.137.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DF052695 for ; Sun, 9 Apr 2023 19:28:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metafoo.de; s=default2002; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID; bh=kJRNGZkKr8CUvUmVHWM6Ireku+hSf/LpbXSxKTWbXSg=; b=gRbVl7TQMhTAPi0LbZvKGtgN8N jSKta2pGJpgEgvE8SmxndS4d3PbdXHfoJj1ZtLKC26aKFE5VyhOyoPXwTfXYUBtJ0F6ZiaxKrWRm+ 2f2D93ZwVDFp9JEApn5RZ0YWhiNAu2YM5dZUt41FhNusLkcQFpnOwi41QlYE1QCh0RxLEzwBqvSxU Aj6+qrUyIDevS/Pp2HNRSvYrScsx/7GgpfWy5w0QxU8xWmXKHbfRFcPPVm+HZqVFHNrPWg1rfYDif Iih9fCIOHImm8gXBs65gcLiTJ64ygIaNaGJT1tR9G8q/sr4UiHW+H7bLW7IuyXiCioq+JlF9B12xJ q5RsCWjA==; Received: from sslproxy04.your-server.de ([78.46.152.42]) by www381.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1plgbJ-0002Re-QY; Mon, 10 Apr 2023 03:45:45 +0200 Received: from [2604:5500:c0e5:eb00:da5e:d3ff:feff:933b] (helo=lars-desktop.lan) by sslproxy04.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1plgbJ-000EJ6-6J; Mon, 10 Apr 2023 03:45:45 +0200 From: Lars-Peter Clausen To: Michael Turquette , Stephen Boyd Cc: Eugeniy Paltsev , Mike Looijmans , Max Filippov , Bjorn Andersson , Kunihiko Hayashi , Masami Hiramatsu , Sebastian Hesselbarth , linux-clk@vger.kernel.org, Lars-Peter Clausen Subject: [PATCH 07/11] clk: qcom: rpm: Use managed `of_clk_add_hw_provider()` Date: Sun, 9 Apr 2023 18:44:58 -0700 Message-Id: <20230410014502.27929-7-lars@metafoo.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230410014502.27929-1-lars@metafoo.de> References: <20230410014502.27929-1-lars@metafoo.de> MIME-Version: 1.0 X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.103.8/26870/Sun Apr 9 09:25:02 2023) Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Use the managed `devm_of_clk_add_hw_provider()` instead of `of_clk_add_hw_provider()`. This makes sure the provider gets automatically removed on unbind and allows to completely eliminate the drivers `remove()` callback. Signed-off-by: Lars-Peter Clausen Reviewed-by: Stephen Boyd --- drivers/clk/qcom/clk-rpm.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/clk/qcom/clk-rpm.c b/drivers/clk/qcom/clk-rpm.c index b1be5b664bf3..cac623e27b0e 100644 --- a/drivers/clk/qcom/clk-rpm.c +++ b/drivers/clk/qcom/clk-rpm.c @@ -580,8 +580,8 @@ static int rpm_clk_probe(struct platform_device *pdev) goto err; } - ret = of_clk_add_hw_provider(pdev->dev.of_node, qcom_rpm_clk_hw_get, - rcc); + ret = devm_of_clk_add_hw_provider(&pdev->dev, qcom_rpm_clk_hw_get, + rcc); if (ret) goto err; @@ -591,19 +591,12 @@ static int rpm_clk_probe(struct platform_device *pdev) return ret; } -static int rpm_clk_remove(struct platform_device *pdev) -{ - of_clk_del_provider(pdev->dev.of_node); - return 0; -} - static struct platform_driver rpm_clk_driver = { .driver = { .name = "qcom-clk-rpm", .of_match_table = rpm_clk_match_table, }, .probe = rpm_clk_probe, - .remove = rpm_clk_remove, }; static int __init rpm_clk_init(void) From patchwork Mon Apr 10 01:44:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 13206068 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25BDCC77B61 for ; Mon, 10 Apr 2023 02:27:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229714AbjDJC1y (ORCPT ); Sun, 9 Apr 2023 22:27:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229704AbjDJC1x (ORCPT ); Sun, 9 Apr 2023 22:27:53 -0400 Received: from www381.your-server.de (www381.your-server.de [78.46.137.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17A783581 for ; Sun, 9 Apr 2023 19:27:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metafoo.de; s=default2002; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID; bh=BjDI/aGsiz4hqT2SW8NQu0wSC+gKkAqaZALS5Khm6vM=; b=WI2q75yO38pIJY94syHtZunf9T QWWWEGNkL1ewz6D1eTYVj2p8nybwzobfQ36qGvuNjLR+/HduSFuiOwBP1C5uX6B6Ub8AAg1pWQiwa AWCF6DjO+wzRGhXE89ZvpVuyfmTsuEMkVFUbjdm9a64nDB78SgeolkowfSWpGa6IN7b9o9JStEeeE spKoh2y90fKLNmQpap9aZgtJaQUSrJobnLtOq3EcsDsk43wMi6t97eIZDOGlThoYPkIcT9nqRHzuz ulb9YR9KGRWnqgLIJXbLEMSbRQzxE/xiXNn/CMrQ5BK5WXQZM3sZwfp1zPQJbcT7VRqgpUEL/A49D uuo8L5SQ==; Received: from sslproxy04.your-server.de ([78.46.152.42]) by www381.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1plgbM-0002Sr-67; Mon, 10 Apr 2023 03:45:48 +0200 Received: from [2604:5500:c0e5:eb00:da5e:d3ff:feff:933b] (helo=lars-desktop.lan) by sslproxy04.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1plgbL-000EJ6-Hk; Mon, 10 Apr 2023 03:45:47 +0200 From: Lars-Peter Clausen To: Michael Turquette , Stephen Boyd Cc: Eugeniy Paltsev , Mike Looijmans , Max Filippov , Bjorn Andersson , Kunihiko Hayashi , Masami Hiramatsu , Sebastian Hesselbarth , linux-clk@vger.kernel.org, Lars-Peter Clausen Subject: [PATCH 08/11] clk: si514: Use managed `of_clk_add_hw_provider()` Date: Sun, 9 Apr 2023 18:44:59 -0700 Message-Id: <20230410014502.27929-8-lars@metafoo.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230410014502.27929-1-lars@metafoo.de> References: <20230410014502.27929-1-lars@metafoo.de> MIME-Version: 1.0 X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.103.8/26870/Sun Apr 9 09:25:02 2023) Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Use the managed `devm_of_clk_add_hw_provider()` instead of `of_clk_add_hw_provider()`. This makes sure the provider gets automatically removed on unbind and allows to completely eliminate the drivers `remove()` callback. Signed-off-by: Lars-Peter Clausen --- drivers/clk/clk-si514.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/clk/clk-si514.c b/drivers/clk/clk-si514.c index c028fa103bed..cabdd8e8f4db 100644 --- a/drivers/clk/clk-si514.c +++ b/drivers/clk/clk-si514.c @@ -360,8 +360,8 @@ static int si514_probe(struct i2c_client *client) dev_err(&client->dev, "clock registration failed\n"); return err; } - err = of_clk_add_hw_provider(client->dev.of_node, of_clk_hw_simple_get, - &data->hw); + err = devm_of_clk_add_hw_provider(&client->dev, of_clk_hw_simple_get, + &data->hw); if (err) { dev_err(&client->dev, "unable to add clk provider\n"); return err; @@ -370,11 +370,6 @@ static int si514_probe(struct i2c_client *client) return 0; } -static void si514_remove(struct i2c_client *client) -{ - of_clk_del_provider(client->dev.of_node); -} - static const struct i2c_device_id si514_id[] = { { "si514", 0 }, { } @@ -393,7 +388,6 @@ static struct i2c_driver si514_driver = { .of_match_table = clk_si514_of_match, }, .probe_new = si514_probe, - .remove = si514_remove, .id_table = si514_id, }; module_i2c_driver(si514_driver); From patchwork Mon Apr 10 01:45:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 13206074 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3E00C77B61 for ; Mon, 10 Apr 2023 02:29:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229729AbjDJC3G (ORCPT ); Sun, 9 Apr 2023 22:29:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229716AbjDJC3F (ORCPT ); Sun, 9 Apr 2023 22:29:05 -0400 Received: from www381.your-server.de (www381.your-server.de [78.46.137.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7919E2707 for ; Sun, 9 Apr 2023 19:29:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metafoo.de; s=default2002; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID; bh=OACAmCnJzzFUADEQwQY2DOfhADXTuYzl/Z0mQvX1m/k=; b=ZpRq8Ww3H0IWdX6Tsa8mZNc8v1 UDShxpMROjSzSiAlDk3YVmWBg/n1Ij97AySYsZFw/QfsgNnDkdt4DvQATD+38obgqFxTr5NEZaU9b 5HAkZQ2WiFaCaVgzvCycfGbvQC5r0cf3rneUAcNr9Lj9VRpujlA3vpc8eEsMGQRUWfA0GuvjzTSkc VT8aSoiulZeW3FJkuaz5+kf5eAuFQQxPhVpNd6IqgeDgskvCLf3gWM7iBeQ3X6fvpd3MjD6pakNvK Ke9rXAgyAx/Ugp4Zl/vdEPtDs4/aM2ACtGN+FyVFX8UVT8UoaJ4ysPolD9PvMv6xDZjkwFmfIUR0h ePfjORyw==; Received: from sslproxy04.your-server.de ([78.46.152.42]) by www381.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1plgbO-0002U3-HC; Mon, 10 Apr 2023 03:45:50 +0200 Received: from [2604:5500:c0e5:eb00:da5e:d3ff:feff:933b] (helo=lars-desktop.lan) by sslproxy04.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1plgbN-000EJ6-T9; Mon, 10 Apr 2023 03:45:50 +0200 From: Lars-Peter Clausen To: Michael Turquette , Stephen Boyd Cc: Eugeniy Paltsev , Mike Looijmans , Max Filippov , Bjorn Andersson , Kunihiko Hayashi , Masami Hiramatsu , Sebastian Hesselbarth , linux-clk@vger.kernel.org, Lars-Peter Clausen Subject: [PATCH 09/11] clk: si570: Use managed `of_clk_add_hw_provider()` Date: Sun, 9 Apr 2023 18:45:00 -0700 Message-Id: <20230410014502.27929-9-lars@metafoo.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230410014502.27929-1-lars@metafoo.de> References: <20230410014502.27929-1-lars@metafoo.de> MIME-Version: 1.0 X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.103.8/26870/Sun Apr 9 09:25:02 2023) Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Use the managed `devm_of_clk_add_hw_provider()` instead of `of_clk_add_hw_provider()`. This makes sure the provider gets automatically removed on unbind and allows to completely eliminate the drivers `remove()` callback. Signed-off-by: Lars-Peter Clausen --- drivers/clk/clk-si570.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/clk/clk-si570.c b/drivers/clk/clk-si570.c index 0a6d70c49726..0b834e9efb4b 100644 --- a/drivers/clk/clk-si570.c +++ b/drivers/clk/clk-si570.c @@ -474,8 +474,8 @@ static int si570_probe(struct i2c_client *client) dev_err(&client->dev, "clock registration failed\n"); return err; } - err = of_clk_add_hw_provider(client->dev.of_node, of_clk_hw_simple_get, - &data->hw); + err = devm_of_clk_add_hw_provider(&client->dev, of_clk_hw_simple_get, + &data->hw); if (err) { dev_err(&client->dev, "unable to add clk provider\n"); return err; @@ -485,10 +485,8 @@ static int si570_probe(struct i2c_client *client) if (!of_property_read_u32(client->dev.of_node, "clock-frequency", &initial_fout)) { err = clk_set_rate(data->hw.clk, initial_fout); - if (err) { - of_clk_del_provider(client->dev.of_node); + if (err) return err; - } } /* Display a message indicating that we've successfully registered */ @@ -498,11 +496,6 @@ static int si570_probe(struct i2c_client *client) return 0; } -static void si570_remove(struct i2c_client *client) -{ - of_clk_del_provider(client->dev.of_node); -} - static const struct of_device_id clk_si570_of_match[] = { { .compatible = "silabs,si570" }, { .compatible = "silabs,si571" }, @@ -518,7 +511,6 @@ static struct i2c_driver si570_driver = { .of_match_table = clk_si570_of_match, }, .probe_new = si570_probe, - .remove = si570_remove, .id_table = si570_id, }; module_i2c_driver(si570_driver); From patchwork Mon Apr 10 01:45:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 13206076 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB011C77B6E for ; Mon, 10 Apr 2023 02:29:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229730AbjDJC3N (ORCPT ); Sun, 9 Apr 2023 22:29:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229716AbjDJC3M (ORCPT ); Sun, 9 Apr 2023 22:29:12 -0400 Received: from www381.your-server.de (www381.your-server.de [78.46.137.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6BD02707 for ; Sun, 9 Apr 2023 19:29:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metafoo.de; s=default2002; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID; bh=x8BZFSGcvqvIdwesaw8duAjdQtuMH/hw45cvqPwO7fw=; b=XhhR/LBLAXDIVoIGbFQVbiAiXs ck8tQCgBD7MlfSvbwdEC90PBbYrR8CV4l2xVp1GqlBcZ+899ULbFCTCGjOH26ygxW/0chj2Tsgt6c 0JIuTb5Ce3YFl6OHBpJHVVlJY2X0vsOdGjEwbCIxf6oqI3ljzGI2MhVG53MUit2LquZOy891+d66o M2sDQOhWfIqAH6jV/ZvLLg6dqjEAJ1a7++b+VHefHgqi2VoNnQ4DF8d2xj26/vIbsuaivMIzYyO1X n9teiZAUaJWTFYn2Qf2hD7K6Po7uwvJsemaBtiaKkx61Y5uPOdwunKFUfm1ainwl9EfIy4HRD/e2z TsvSkJsg==; Received: from sslproxy04.your-server.de ([78.46.152.42]) by www381.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1plgbQ-0002UJ-Ra; Mon, 10 Apr 2023 03:45:52 +0200 Received: from [2604:5500:c0e5:eb00:da5e:d3ff:feff:933b] (helo=lars-desktop.lan) by sslproxy04.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1plgbQ-000EJ6-8K; Mon, 10 Apr 2023 03:45:52 +0200 From: Lars-Peter Clausen To: Michael Turquette , Stephen Boyd Cc: Eugeniy Paltsev , Mike Looijmans , Max Filippov , Bjorn Andersson , Kunihiko Hayashi , Masami Hiramatsu , Sebastian Hesselbarth , linux-clk@vger.kernel.org, Lars-Peter Clausen Subject: [PATCH 10/11] clk: si5351: Use managed `of_clk_add_hw_provider()` Date: Sun, 9 Apr 2023 18:45:01 -0700 Message-Id: <20230410014502.27929-10-lars@metafoo.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230410014502.27929-1-lars@metafoo.de> References: <20230410014502.27929-1-lars@metafoo.de> MIME-Version: 1.0 X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.103.8/26870/Sun Apr 9 09:25:02 2023) Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Use the managed `devm_of_clk_add_hw_provider()` instead of `of_clk_add_hw_provider()`. This makes sure the provider gets automatically removed on unbind and allows to completely eliminate the drivers `remove()` callback. Signed-off-by: Lars-Peter Clausen --- drivers/clk/clk-si5351.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/clk/clk-si5351.c b/drivers/clk/clk-si5351.c index 9e939c98a455..4fcf7056717e 100644 --- a/drivers/clk/clk-si5351.c +++ b/drivers/clk/clk-si5351.c @@ -1641,8 +1641,8 @@ static int si5351_i2c_probe(struct i2c_client *client) } } - ret = of_clk_add_hw_provider(client->dev.of_node, si53351_of_clk_get, - drvdata); + ret = devm_of_clk_add_hw_provider(&client->dev, si53351_of_clk_get, + drvdata); if (ret) { dev_err(&client->dev, "unable to add clk provider\n"); return ret; @@ -1651,18 +1651,12 @@ static int si5351_i2c_probe(struct i2c_client *client) return 0; } -static void si5351_i2c_remove(struct i2c_client *client) -{ - of_clk_del_provider(client->dev.of_node); -} - static struct i2c_driver si5351_driver = { .driver = { .name = "si5351", .of_match_table = of_match_ptr(si5351_dt_ids), }, .probe_new = si5351_i2c_probe, - .remove = si5351_i2c_remove, .id_table = si5351_i2c_ids, }; module_i2c_driver(si5351_driver); From patchwork Mon Apr 10 01:45:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 13206077 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8CBFDC77B61 for ; Mon, 10 Apr 2023 02:29:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229731AbjDJC3U (ORCPT ); Sun, 9 Apr 2023 22:29:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229716AbjDJC3T (ORCPT ); Sun, 9 Apr 2023 22:29:19 -0400 Received: from www381.your-server.de (www381.your-server.de [78.46.137.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5ED9F2707 for ; Sun, 9 Apr 2023 19:29:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metafoo.de; s=default2002; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID; bh=LEugraMhat8ELuRgKAwGAhgX6HCm0l+FgWHQ3aPTooQ=; b=j/9YNhj0aV5MD3L1JRFoApoGbg hqxLXQ8zptFZNDe0b4BAOY1FweT4SyBy4uIGJtltN6Ndht3BDugu5h9NHGXxfalbPxwDOPBYcx8UD +FIHfzP3t4+yi5+PqrCqROY0ELSa83rC/TsWMkT2sJJytjeOGcYKRlPtdVb1NTjGEtUGdENyos1yk FHQ7GGpwR8bQ93386hJI6xZ/j4Yi+wA9tItVo7F4Dmfj3tuEfsa+wt3Cse6Uoy/gXYARpvTUrdJI+ BGz6lK7Vc/JcrXm9jTPYU+jn3p+YZK1QcEqmyTy53z2PeLRsiVjZpZlpkRzRWqoSqdYB3km6JXYaO d6NJqFnQ==; Received: from sslproxy04.your-server.de ([78.46.152.42]) by www381.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1plgt9-0004HP-AP; Mon, 10 Apr 2023 04:04:11 +0200 Received: from [2604:5500:c0e5:eb00:da5e:d3ff:feff:933b] (helo=lars-desktop.lan) by sslproxy04.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1plgbS-000EJ6-Jk; Mon, 10 Apr 2023 03:45:54 +0200 From: Lars-Peter Clausen To: Michael Turquette , Stephen Boyd Cc: Eugeniy Paltsev , Mike Looijmans , Max Filippov , Bjorn Andersson , Kunihiko Hayashi , Masami Hiramatsu , Sebastian Hesselbarth , linux-clk@vger.kernel.org, Lars-Peter Clausen Subject: [PATCH 11/11] clk: uniphier: Use managed `of_clk_add_hw_provider()` Date: Sun, 9 Apr 2023 18:45:02 -0700 Message-Id: <20230410014502.27929-11-lars@metafoo.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230410014502.27929-1-lars@metafoo.de> References: <20230410014502.27929-1-lars@metafoo.de> MIME-Version: 1.0 X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.103.8/26870/Sun Apr 9 09:25:02 2023) Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Use the managed `devm_of_clk_add_hw_provider()` instead of `of_clk_add_hw_provider()`. This makes sure the provider gets automatically removed on unbind and allows to completely eliminate the drivers `remove()` callback. Signed-off-by: Lars-Peter Clausen --- drivers/clk/uniphier/clk-uniphier-core.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/clk/uniphier/clk-uniphier-core.c b/drivers/clk/uniphier/clk-uniphier-core.c index 92f4ddc593db..a61213311d6c 100644 --- a/drivers/clk/uniphier/clk-uniphier-core.c +++ b/drivers/clk/uniphier/clk-uniphier-core.c @@ -87,13 +87,8 @@ static int uniphier_clk_probe(struct platform_device *pdev) hw_data->hws[p->idx] = hw; } - return of_clk_add_hw_provider(dev->of_node, of_clk_hw_onecell_get, - hw_data); -} - -static void uniphier_clk_remove(struct platform_device *pdev) -{ - of_clk_del_provider(pdev->dev.of_node); + return devm_of_clk_add_hw_provider(dev, of_clk_hw_onecell_get, + hw_data); } static const struct of_device_id uniphier_clk_match[] = { @@ -218,7 +213,6 @@ static const struct of_device_id uniphier_clk_match[] = { static struct platform_driver uniphier_clk_driver = { .probe = uniphier_clk_probe, - .remove_new = uniphier_clk_remove, .driver = { .name = "uniphier-clk", .of_match_table = uniphier_clk_match,