.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Nomadik clock implementation |
---|
3 | 4 | * Copyright (C) 2013 ST-Ericsson AB |
---|
4 | | - * License terms: GNU General Public License (GPL) version 2 |
---|
5 | 5 | * Author: Linus Walleij <linus.walleij@linaro.org> |
---|
6 | 6 | */ |
---|
7 | 7 | |
---|
.. | .. |
---|
97 | 97 | } |
---|
98 | 98 | src_base = of_iomap(np, 0); |
---|
99 | 99 | 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); |
---|
102 | 102 | return; |
---|
103 | 103 | } |
---|
104 | 104 | |
---|
.. | .. |
---|
259 | 259 | { |
---|
260 | 260 | int ret; |
---|
261 | 261 | struct clk_pll *pll; |
---|
262 | | - struct clk_init_data init = {}; |
---|
| 262 | + struct clk_init_data init; |
---|
263 | 263 | |
---|
264 | 264 | if (id != 1 && id != 2) { |
---|
265 | 265 | pr_err("%s: the Nomadik has only PLL 1 & 2\n", __func__); |
---|
.. | .. |
---|
351 | 351 | { |
---|
352 | 352 | int ret; |
---|
353 | 353 | struct clk_src *sclk; |
---|
354 | | - struct clk_init_data init = {}; |
---|
| 354 | + struct clk_init_data init; |
---|
355 | 355 | |
---|
356 | 356 | sclk = kzalloc(sizeof(*sclk), GFP_KERNEL); |
---|
357 | 357 | if (!sclk) |
---|
.. | .. |
---|
455 | 455 | "RNGCCLK ", |
---|
456 | 456 | }; |
---|
457 | 457 | |
---|
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) |
---|
459 | 459 | { |
---|
460 | 460 | int i; |
---|
461 | 461 | u32 src_pcksr0 = readl(src_base + SRC_PCKSR0); |
---|
.. | .. |
---|
479 | 479 | return 0; |
---|
480 | 480 | } |
---|
481 | 481 | |
---|
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); |
---|
493 | 483 | |
---|
494 | 484 | static int __init nomadik_src_clk_init_debugfs(void) |
---|
495 | 485 | { |
---|
.. | .. |
---|
499 | 489 | src_pcksr0_boot = readl(src_base + SRC_PCKSR0); |
---|
500 | 490 | src_pcksr1_boot = readl(src_base + SRC_PCKSR1); |
---|
501 | 491 | 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); |
---|
503 | 493 | return 0; |
---|
504 | 494 | } |
---|
505 | 495 | device_initcall(nomadik_src_clk_init_debugfs); |
---|