* [PATCH] clk: nomadik: Change to use DEFINE_SHOW_ATTRIBUTE macro
@ 2018-11-23 15:06 Yangtao Li
2018-11-28 22:08 ` Stephen Boyd
0 siblings, 1 reply; 4+ messages in thread
From: Yangtao Li @ 2018-11-23 15:06 UTC (permalink / raw)
To: linus.walleij, mturquette, sboyd
Cc: linux-arm-kernel, linux-clk, linux-kernel, Yangtao Li
Use macro to simplify the code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
drivers/clk/clk-nomadik.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/drivers/clk/clk-nomadik.c b/drivers/clk/clk-nomadik.c
index 84a24875c629..e331634d34df 100644
--- a/drivers/clk/clk-nomadik.c
+++ b/drivers/clk/clk-nomadik.c
@@ -479,17 +479,7 @@ static int nomadik_src_clk_show(struct seq_file *s, void *what)
return 0;
}
-static int nomadik_src_clk_open(struct inode *inode, struct file *file)
-{
- return single_open(file, nomadik_src_clk_show, NULL);
-}
-
-static const struct file_operations nomadik_src_clk_debugfs_ops = {
- .open = nomadik_src_clk_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(nomadik_src_clk_debugfs);
static int __init nomadik_src_clk_init_debugfs(void)
{
@@ -499,7 +489,7 @@ static int __init nomadik_src_clk_init_debugfs(void)
src_pcksr0_boot = readl(src_base + SRC_PCKSR0);
src_pcksr1_boot = readl(src_base + SRC_PCKSR1);
debugfs_create_file("nomadik-src-clk", S_IFREG | S_IRUGO,
- NULL, NULL, &nomadik_src_clk_debugfs_ops);
+ NULL, NULL, &nomadik_src_clk_debugfs_fops);
return 0;
}
device_initcall(nomadik_src_clk_init_debugfs);
--
2.17.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] clk: nomadik: Change to use DEFINE_SHOW_ATTRIBUTE macro
2018-11-23 15:06 [PATCH] clk: nomadik: Change to use DEFINE_SHOW_ATTRIBUTE macro Yangtao Li
@ 2018-11-28 22:08 ` Stephen Boyd
2018-11-28 22:12 ` Stephen Boyd
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Boyd @ 2018-11-28 22:08 UTC (permalink / raw)
To: Yangtao Li, linus.walleij, mturquette
Cc: linux-arm-kernel, linux-clk, linux-kernel, Yangtao Li
Quoting Yangtao Li (2018-11-23 07:06:00)
> Use macro to simplify the code.
>
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> ---
Applied to clk-next
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] clk: nomadik: Change to use DEFINE_SHOW_ATTRIBUTE macro
2018-11-28 22:08 ` Stephen Boyd
@ 2018-11-28 22:12 ` Stephen Boyd
2018-11-29 5:56 ` Frank Lee
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Boyd @ 2018-11-28 22:12 UTC (permalink / raw)
To: Yangtao Li, linus.walleij, mturquette
Cc: linux-arm-kernel, linux-clk, linux-kernel, Yangtao Li
Quoting Stephen Boyd (2018-11-28 14:08:32)
> Quoting Yangtao Li (2018-11-23 07:06:00)
> > Use macro to simplify the code.
> >
> > Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> > ---
>
> Applied to clk-next
>
Except this doesn't compile. I fixed it, but please actually compile
your patches before sending next time.
diff --git a/drivers/clk/clk-nomadik.c b/drivers/clk/clk-nomadik.c
index e331634d34df..a95aa96f4a68 100644
--- a/drivers/clk/clk-nomadik.c
+++ b/drivers/clk/clk-nomadik.c
@@ -455,7 +455,7 @@ static const char * const src_clk_names[] = {
"RNGCCLK ",
};
-static int nomadik_src_clk_show(struct seq_file *s, void *what)
+static int nomadik_src_clk_debugfs_show(struct seq_file *s, void *what)
{
int i;
u32 src_pcksr0 = readl(src_base + SRC_PCKSR0);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] clk: nomadik: Change to use DEFINE_SHOW_ATTRIBUTE macro
2018-11-28 22:12 ` Stephen Boyd
@ 2018-11-29 5:56 ` Frank Lee
0 siblings, 0 replies; 4+ messages in thread
From: Frank Lee @ 2018-11-29 5:56 UTC (permalink / raw)
To: sboyd
Cc: Linus Walleij, Michael Turquette, linux-arm-kernel, linux-clk,
linux-kernel
On Thu, Nov 29, 2018 at 6:12 AM Stephen Boyd <sboyd@kernel.org> wrote:
>
> Quoting Stephen Boyd (2018-11-28 14:08:32)
> > Quoting Yangtao Li (2018-11-23 07:06:00)
> > > Use macro to simplify the code.
> > >
> > > Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> > > ---
> >
> > Applied to clk-next
> >
>
> Except this doesn't compile. I fixed it, but please actually compile
> your patches before sending next time.
Sorry, I will pay attention next time.
MBR,
Yangtao
>
> diff --git a/drivers/clk/clk-nomadik.c b/drivers/clk/clk-nomadik.c
> index e331634d34df..a95aa96f4a68 100644
> --- a/drivers/clk/clk-nomadik.c
> +++ b/drivers/clk/clk-nomadik.c
> @@ -455,7 +455,7 @@ static const char * const src_clk_names[] = {
> "RNGCCLK ",
> };
>
> -static int nomadik_src_clk_show(struct seq_file *s, void *what)
> +static int nomadik_src_clk_debugfs_show(struct seq_file *s, void *what)
> {
> int i;
> u32 src_pcksr0 = readl(src_base + SRC_PCKSR0);
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-11-29 5:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-23 15:06 [PATCH] clk: nomadik: Change to use DEFINE_SHOW_ATTRIBUTE macro Yangtao Li
2018-11-28 22:08 ` Stephen Boyd
2018-11-28 22:12 ` Stephen Boyd
2018-11-29 5:56 ` Frank Lee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).