summaryrefslogtreecommitdiff
path: root/kernel/power/qos.c
diff options
context:
space:
mode:
authorYangtao Li <tiny.windzz@gmail.com>2018-11-06 09:38:06 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-11-29 22:28:11 +0100
commit96c6935212d632cb78db9149c61005b839e03b75 (patch)
tree270c9e2d8a828cf0c152d4a6ede44c492bf170a9 /kernel/power/qos.c
parent2e6e902d185027f8e3cb8b7305238f7e35d6a436 (diff)
PM / QoS: 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> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'kernel/power/qos.c')
-rw-r--r--kernel/power/qos.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/kernel/power/qos.c b/kernel/power/qos.c
index 86d72ffb811b..b7a82502857a 100644
--- a/kernel/power/qos.c
+++ b/kernel/power/qos.c
@@ -184,7 +184,7 @@ static inline void pm_qos_set_value(struct pm_qos_constraints *c, s32 value)
c->target_value = value;
}
-static int pm_qos_dbg_show_requests(struct seq_file *s, void *unused)
+static int pm_qos_debug_show(struct seq_file *s, void *unused)
{
struct pm_qos_object *qos = (struct pm_qos_object *)s->private;
struct pm_qos_constraints *c;
@@ -245,18 +245,7 @@ out:
return 0;
}
-static int pm_qos_dbg_open(struct inode *inode, struct file *file)
-{
- return single_open(file, pm_qos_dbg_show_requests,
- inode->i_private);
-}
-
-static const struct file_operations pm_qos_debug_fops = {
- .open = pm_qos_dbg_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(pm_qos_debug);
/**
* pm_qos_update_target - manages the constraints list and calls the notifiers