summaryrefslogtreecommitdiff
path: root/drivers/acpi/apei
diff options
context:
space:
mode:
authorYangtao Li <tiny.windzz@gmail.com>2018-11-30 20:01:06 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-12-11 14:14:16 +0300
commit0c166c3deda577955cb39f0242b734634949f1d3 (patch)
treebd4b1f93c6c164d2506a505420c3a3ec14e58575 /drivers/acpi/apei
parent40e020c129cfc991e8ab4736d2665351ffd1468d (diff)
downloadlinux-0c166c3deda577955cb39f0242b734634949f1d3.tar.xz
ACPI, APEI, EINJ: 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: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/apei')
-rw-r--r--drivers/acpi/apei/einj.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/acpi/apei/einj.c b/drivers/acpi/apei/einj.c
index b38737c83a24..fcccbfdbdd1a 100644
--- a/drivers/acpi/apei/einj.c
+++ b/drivers/acpi/apei/einj.c
@@ -607,17 +607,7 @@ static int available_error_type_show(struct seq_file *m, void *v)
return 0;
}
-static int available_error_type_open(struct inode *inode, struct file *file)
-{
- return single_open(file, available_error_type_show, NULL);
-}
-
-static const struct file_operations available_error_type_fops = {
- .open = available_error_type_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(available_error_type);
static int error_type_get(void *data, u64 *val)
{