diff options
author | Yangtao Li <tiny.windzz@gmail.com> | 2018-11-30 21:33:55 -0500 |
---|---|---|
committer | Sebastian Reichel <sebastian.reichel@collabora.com> | 2018-12-05 00:16:59 +0100 |
commit | 3a658e09a215586918044d8f8b8358eb14fa3f7d (patch) | |
tree | 61f7957ce20da5aa340b1024ff327b177453cee0 /drivers/hsi/controllers/omap_ssi_port.c | |
parent | 651022382c7f8da46cb4872a545ee1da6d097d2a (diff) |
HSI: omap_ssi: Change to use DEFINE_SHOW_ATTRIBUTE macro
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/hsi/controllers/omap_ssi_port.c')
-rw-r--r-- | drivers/hsi/controllers/omap_ssi_port.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/hsi/controllers/omap_ssi_port.c b/drivers/hsi/controllers/omap_ssi_port.c index 2ada82d2ec8c..b2b3989ccfd2 100644 --- a/drivers/hsi/controllers/omap_ssi_port.c +++ b/drivers/hsi/controllers/omap_ssi_port.c @@ -57,7 +57,7 @@ static void ssi_debug_remove_port(struct hsi_port *port) debugfs_remove_recursive(omap_port->dir); } -static int ssi_debug_port_show(struct seq_file *m, void *p __maybe_unused) +static int ssi_port_regs_show(struct seq_file *m, void *p __maybe_unused) { struct hsi_port *port = m->private; struct omap_ssi_port *omap_port = hsi_port_drvdata(port); @@ -132,17 +132,7 @@ static int ssi_debug_port_show(struct seq_file *m, void *p __maybe_unused) return 0; } -static int ssi_port_regs_open(struct inode *inode, struct file *file) -{ - return single_open(file, ssi_debug_port_show, inode->i_private); -} - -static const struct file_operations ssi_port_regs_fops = { - .open = ssi_port_regs_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; +DEFINE_SHOW_ATTRIBUTE(ssi_port_regs); static int ssi_div_get(void *data, u64 *val) { |