summaryrefslogtreecommitdiffstats
path: root/drivers/clk/tegra
diff options
context:
space:
mode:
authorYangtao Li <tiny.windzz@gmail.com>2018-11-23 10:01:04 -0500
committerStephen Boyd <sboyd@kernel.org>2018-11-28 14:13:18 -0800
commite374e06880f93fffdc5ce320c9152bad4776911f (patch)
treeba54c31c945976fd96baac1a486e4fcedf6403f1 /drivers/clk/tegra
parent9579346ecf761303fc85be908d1ad3d947fac354 (diff)
downloadtalos-obmc-linux-e374e06880f93fffdc5ce320c9152bad4776911f.tar.gz
talos-obmc-linux-e374e06880f93fffdc5ce320c9152bad4776911f.zip
clk: tegra: Change to use DEFINE_SHOW_ATTRIBUTE macro
Use macro to simplify the code. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/tegra')
-rw-r--r--drivers/clk/tegra/clk-dfll.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/clk/tegra/clk-dfll.c b/drivers/clk/tegra/clk-dfll.c
index ebb0e1b6bf01..609e363dabf8 100644
--- a/drivers/clk/tegra/clk-dfll.c
+++ b/drivers/clk/tegra/clk-dfll.c
@@ -1184,17 +1184,7 @@ static int attr_registers_show(struct seq_file *s, void *data)
return 0;
}
-static int attr_registers_open(struct inode *inode, struct file *file)
-{
- return single_open(file, attr_registers_show, inode->i_private);
-}
-
-static const struct file_operations attr_registers_fops = {
- .open = attr_registers_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(attr_registers);
static void dfll_debug_init(struct tegra_dfll *td)
{
OpenPOWER on IntegriCloud