* [PATCH] thermal: tegra: soctherm: Change to use DEFINE_SHOW_ATTRIBUTE macro
@ 2018-11-23 14:50 Yangtao Li
2018-12-26 16:03 ` Frank Lee
0 siblings, 1 reply; 2+ messages in thread
From: Yangtao Li @ 2018-11-23 14:50 UTC (permalink / raw)
To: rui.zhang, edubezval, daniel.lezcano, thierry.reding, jonathanh,
keescook, nicoleotsuka, ezequiel, srplinux2008
Cc: linux-pm, linux-tegra, linux-kernel, Yangtao Li
Use macro to simplify the code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
drivers/thermal/tegra/soctherm.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/soctherm.c
index ed28110a3535..45b41b885f49 100644
--- a/drivers/thermal/tegra/soctherm.c
+++ b/drivers/thermal/tegra/soctherm.c
@@ -803,17 +803,7 @@ static int regs_show(struct seq_file *s, void *data)
return 0;
}
-static int regs_open(struct inode *inode, struct file *file)
-{
- return single_open(file, regs_show, inode->i_private);
-}
-
-static const struct file_operations regs_fops = {
- .open = regs_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(regs);
static void soctherm_debug_init(struct platform_device *pdev)
{
--
2.17.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] thermal: tegra: soctherm: Change to use DEFINE_SHOW_ATTRIBUTE macro
2018-11-23 14:50 [PATCH] thermal: tegra: soctherm: Change to use DEFINE_SHOW_ATTRIBUTE macro Yangtao Li
@ 2018-12-26 16:03 ` Frank Lee
0 siblings, 0 replies; 2+ messages in thread
From: Frank Lee @ 2018-12-26 16:03 UTC (permalink / raw)
To: rui.zhang, Eduardo Valentin, Daniel Lezcano, Thierry Reding,
jonathanh, Kees Cook, Nicolin Chen, ezequiel, srplinux2008
Cc: Linux PM, linux-tegra, Linux Kernel Mailing List
ping...
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-26 16:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-23 14:50 [PATCH] thermal: tegra: soctherm: Change to use DEFINE_SHOW_ATTRIBUTE macro Yangtao Li
2018-12-26 16:03 ` 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).