forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/cpufreq/kirkwood-cpufreq.c
....@@ -1,12 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * kirkwood_freq.c: cpufreq driver for the Marvell kirkwood
34 *
45 * Copyright (C) 2013 Andrew Lunn <andrew@lunn.ch>
5
- *
6
- * This program is free software; you can redistribute it and/or
7
- * modify it under the terms of the GNU General Public License
8
- * as published by the Free Software Foundation; either version
9
- * 2 of the License, or (at your option) any later version.
106 */
117
128 #include <linux/kernel.h>
....@@ -89,7 +85,8 @@
8985 /* Module init and exit code */
9086 static int kirkwood_cpufreq_cpu_init(struct cpufreq_policy *policy)
9187 {
92
- return cpufreq_generic_init(policy, kirkwood_freq_table, 5000);
88
+ cpufreq_generic_init(policy, kirkwood_freq_table, 5000);
89
+ return 0;
9390 }
9491
9592 static struct cpufreq_driver kirkwood_cpufreq_driver = {
....@@ -105,13 +102,11 @@
105102 static int kirkwood_cpufreq_probe(struct platform_device *pdev)
106103 {
107104 struct device_node *np;
108
- struct resource *res;
109105 int err;
110106
111107 priv.dev = &pdev->dev;
112108
113
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
114
- priv.base = devm_ioremap_resource(&pdev->dev, res);
109
+ priv.base = devm_platform_ioremap_resource(pdev, 0);
115110 if (IS_ERR(priv.base))
116111 return PTR_ERR(priv.base);
117112