Message ID | 1521547867-23808-1-git-send-email-sudeep.holla@arm.com (mailing list archive) |
---|---|
State | Awaiting Upstream, archived |
Headers | show |
Hi Stephen, On 20/03/18 12:11, Sudeep Holla wrote: > Commit aa795c41d9cd ("clk: Add devm_of_clk_add_hw_provider()/del_provider() > APIs") adds devm_of_clk_add_hw_provider which takes care of deleting the > clock provider when the clock providers device is removed. > > This patch makes use of devm_of_clk_add_hw_provider() instead of > of_clk_add_hw_provider() so that we can eliminate the need of explicit > scmi_clocks_remove for just doing of_clk_del_provider() > > Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> > --- > drivers/clk/clk-scmi.c | 12 ++---------- > 1 file changed, 2 insertions(+), 10 deletions(-) > Sorry I forgot to mention before, if this looks fine, please provide ack so that I can take it via ARM Soc.
Quoting Sudeep Holla (2018-03-20 05:11:07) > Commit aa795c41d9cd ("clk: Add devm_of_clk_add_hw_provider()/del_provider() > APIs") adds devm_of_clk_add_hw_provider which takes care of deleting the > clock provider when the clock providers device is removed. > > This patch makes use of devm_of_clk_add_hw_provider() instead of > of_clk_add_hw_provider() so that we can eliminate the need of explicit > scmi_clocks_remove for just doing of_clk_del_provider() > > Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> > --- Acked-by: Stephen Boyd <sboyd@kernel.org> -- To unsubscribe from this list: send the line "unsubscribe linux-clk" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/clk/clk-scmi.c b/drivers/clk/clk-scmi.c index 26f1476d4a79..488c21376b55 100644 --- a/drivers/clk/clk-scmi.c +++ b/drivers/clk/clk-scmi.c @@ -172,15 +172,8 @@ static int scmi_clocks_probe(struct scmi_device *sdev) } } - return of_clk_add_hw_provider(np, of_clk_hw_onecell_get, clk_data); -} - -static void scmi_clocks_remove(struct scmi_device *sdev) -{ - struct device *dev = &sdev->dev; - struct device_node *np = dev->of_node; - - of_clk_del_provider(np); + return devm_of_clk_add_hw_provider(dev, of_clk_hw_onecell_get, + clk_data); } static const struct scmi_device_id scmi_id_table[] = { @@ -192,7 +185,6 @@ MODULE_DEVICE_TABLE(scmi, scmi_id_table); static struct scmi_driver scmi_clocks_driver = { .name = "scmi-clocks", .probe = scmi_clocks_probe, - .remove = scmi_clocks_remove, .id_table = scmi_id_table, }; module_scmi_driver(scmi_clocks_driver);
Commit aa795c41d9cd ("clk: Add devm_of_clk_add_hw_provider()/del_provider() APIs") adds devm_of_clk_add_hw_provider which takes care of deleting the clock provider when the clock providers device is removed. This patch makes use of devm_of_clk_add_hw_provider() instead of of_clk_add_hw_provider() so that we can eliminate the need of explicit scmi_clocks_remove for just doing of_clk_del_provider() Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> --- drivers/clk/clk-scmi.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-clk" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html