| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Clkout driver for Rockchip RK808 |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (c) 2014, Fuzhou Rockchip Electronics Co., Ltd |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * 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. |
|---|
| 16 | 8 | */ |
|---|
| 17 | 9 | |
|---|
| 18 | 10 | #include <linux/clk-provider.h> |
|---|
| .. | .. |
|---|
| 200 | 192 | if (ret) |
|---|
| 201 | 193 | return ret; |
|---|
| 202 | 194 | |
|---|
| 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); |
|---|
| 215 | 197 | } |
|---|
| 216 | 198 | |
|---|
| 217 | 199 | static struct platform_driver rk808_clkout_driver = { |
|---|
| 218 | 200 | .probe = rk808_clkout_probe, |
|---|
| 219 | | - .remove = rk808_clkout_remove, |
|---|
| 220 | 201 | .driver = { |
|---|
| 221 | 202 | .name = "rk808-clkout", |
|---|
| 222 | 203 | }, |
|---|