summaryrefslogtreecommitdiff
path: root/arch/mips/ralink/bootrom.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/ralink/bootrom.c')
-rw-r--r--arch/mips/ralink/bootrom.c27
1 files changed, 4 insertions, 23 deletions
diff --git a/arch/mips/ralink/bootrom.c b/arch/mips/ralink/bootrom.c
index e1fa5972a81d..8c8cc0a81ed8 100644
--- a/arch/mips/ralink/bootrom.c
+++ b/arch/mips/ralink/bootrom.c
@@ -1,7 +1,5 @@
+// SPDX-License-Identifier: GPL-2.0-only
/*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published
- * by the Free Software Foundation.
*
* Copyright (C) 2013 John Crispin <john@phrozen.org>
*/
@@ -20,28 +18,11 @@ static int bootrom_show(struct seq_file *s, void *unused)
return 0;
}
+DEFINE_SHOW_ATTRIBUTE(bootrom);
-static int bootrom_open(struct inode *inode, struct file *file)
+static int __init bootrom_setup(void)
{
- return single_open(file, bootrom_show, NULL);
-}
-
-static const struct file_operations bootrom_file_ops = {
- .open = bootrom_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
-
-static int bootrom_setup(void)
-{
- if (!debugfs_create_file("bootrom", 0444,
- NULL, NULL, &bootrom_file_ops)) {
- pr_err("Failed to create bootrom debugfs file\n");
-
- return -EINVAL;
- }
-
+ debugfs_create_file("bootrom", 0444, NULL, NULL, &bootrom_fops);
return 0;
}