hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/drivers/clk/clk-rk808.c
....@@ -1,18 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Clkout driver for Rockchip RK808
34 *
45 * Copyright (c) 2014, Fuzhou Rockchip Electronics Co., Ltd
56 *
67 * Author:Chris Zhong <zyw@rock-chips.com>
7
- *
8
- * This program is free software; you can redistribute it and/or modify it
9
- * under the terms and conditions of the GNU General Public License,
10
- * version 2, as published by the Free Software Foundation.
11
- *
12
- * This program is distributed in the hope it will be useful, but WITHOUT
13
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15
- * more details.
168 */
179
1810 #include <linux/clk-provider.h>
....@@ -200,23 +192,12 @@
200192 if (ret)
201193 return ret;
202194
203
- return of_clk_add_hw_provider(node, of_clk_rk808_get, rk808_clkout);
204
-}
205
-
206
-static int rk808_clkout_remove(struct platform_device *pdev)
207
-{
208
- struct rk808 *rk808 = dev_get_drvdata(pdev->dev.parent);
209
- struct i2c_client *client = rk808->i2c;
210
- struct device_node *node = client->dev.of_node;
211
-
212
- of_clk_del_provider(node);
213
-
214
- return 0;
195
+ return devm_of_clk_add_hw_provider(&pdev->dev, of_clk_rk808_get,
196
+ rk808_clkout);
215197 }
216198
217199 static struct platform_driver rk808_clkout_driver = {
218200 .probe = rk808_clkout_probe,
219
- .remove = rk808_clkout_remove,
220201 .driver = {
221202 .name = "rk808-clkout",
222203 },