hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/clk/clk-nomadik.c
....@@ -1,7 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Nomadik clock implementation
34 * Copyright (C) 2013 ST-Ericsson AB
4
- * License terms: GNU General Public License (GPL) version 2
55 * Author: Linus Walleij <linus.walleij@linaro.org>
66 */
77
....@@ -97,8 +97,8 @@
9797 }
9898 src_base = of_iomap(np, 0);
9999 if (!src_base) {
100
- pr_err("%s: must have src parent node with REGS (%s)\n",
101
- __func__, np->name);
100
+ pr_err("%s: must have src parent node with REGS (%pOFn)\n",
101
+ __func__, np);
102102 return;
103103 }
104104
....@@ -259,7 +259,7 @@
259259 {
260260 int ret;
261261 struct clk_pll *pll;
262
- struct clk_init_data init = {};
262
+ struct clk_init_data init;
263263
264264 if (id != 1 && id != 2) {
265265 pr_err("%s: the Nomadik has only PLL 1 & 2\n", __func__);
....@@ -351,7 +351,7 @@
351351 {
352352 int ret;
353353 struct clk_src *sclk;
354
- struct clk_init_data init = {};
354
+ struct clk_init_data init;
355355
356356 sclk = kzalloc(sizeof(*sclk), GFP_KERNEL);
357357 if (!sclk)
....@@ -455,7 +455,7 @@
455455 "RNGCCLK ",
456456 };
457457
458
-static int nomadik_src_clk_show(struct seq_file *s, void *what)
458
+static int nomadik_src_clk_debugfs_show(struct seq_file *s, void *what)
459459 {
460460 int i;
461461 u32 src_pcksr0 = readl(src_base + SRC_PCKSR0);
....@@ -479,17 +479,7 @@
479479 return 0;
480480 }
481481
482
-static int nomadik_src_clk_open(struct inode *inode, struct file *file)
483
-{
484
- return single_open(file, nomadik_src_clk_show, NULL);
485
-}
486
-
487
-static const struct file_operations nomadik_src_clk_debugfs_ops = {
488
- .open = nomadik_src_clk_open,
489
- .read = seq_read,
490
- .llseek = seq_lseek,
491
- .release = single_release,
492
-};
482
+DEFINE_SHOW_ATTRIBUTE(nomadik_src_clk_debugfs);
493483
494484 static int __init nomadik_src_clk_init_debugfs(void)
495485 {
....@@ -499,7 +489,7 @@
499489 src_pcksr0_boot = readl(src_base + SRC_PCKSR0);
500490 src_pcksr1_boot = readl(src_base + SRC_PCKSR1);
501491 debugfs_create_file("nomadik-src-clk", S_IFREG | S_IRUGO,
502
- NULL, NULL, &nomadik_src_clk_debugfs_ops);
492
+ NULL, NULL, &nomadik_src_clk_debugfs_fops);
503493 return 0;
504494 }
505495 device_initcall(nomadik_src_clk_init_debugfs);