forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f9004dbfff8a3fbbd7e2a88c8a4327c7f2f8e5b2
kernel/arch/arm/mach-zynq/slcr.c
....@@ -1,17 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Xilinx SLCR driver
34 *
45 * Copyright (c) 2011-2013 Xilinx Inc.
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.
10
- *
11
- * You should have received a copy of the GNU General Public
12
- * License along with this program; if not, write to the Free
13
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
14
- * 02139, USA.
156 */
167
178 #include <linux/io.h>
....@@ -222,6 +213,7 @@
222213 zynq_slcr_regmap = syscon_regmap_lookup_by_compatible("xlnx,zynq-slcr");
223214 if (IS_ERR(zynq_slcr_regmap)) {
224215 pr_err("%s: failed to find zynq-slcr\n", __func__);
216
+ of_node_put(np);
225217 return -ENODEV;
226218 }
227219
....@@ -233,7 +225,7 @@
233225
234226 register_restart_handler(&zynq_slcr_restart_nb);
235227
236
- pr_info("%s mapped to %p\n", np->name, zynq_slcr_base);
228
+ pr_info("%pOFn mapped to %p\n", np, zynq_slcr_base);
237229
238230 of_node_put(np);
239231