Commit f718cd4a authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

sched: make scheduler sysfs attributes sysdev class devices

They are really class devices, but were incorrectly declared.  This
leads to crashes with the recent changes that makes non normal sysdevs
use a different prototype.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Pierre Ossman <drzeus-list@drzeus.cx>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 5cdc98b8
...@@ -7671,34 +7671,34 @@ static ssize_t sched_power_savings_store(const char *buf, size_t count, int smt) ...@@ -7671,34 +7671,34 @@ static ssize_t sched_power_savings_store(const char *buf, size_t count, int smt)
} }
#ifdef CONFIG_SCHED_MC #ifdef CONFIG_SCHED_MC
static ssize_t sched_mc_power_savings_show(struct sys_device *dev, static ssize_t sched_mc_power_savings_show(struct sysdev_class *class,
struct sysdev_attribute *attr, char *page) char *page)
{ {
return sprintf(page, "%u\n", sched_mc_power_savings); return sprintf(page, "%u\n", sched_mc_power_savings);
} }
static ssize_t sched_mc_power_savings_store(struct sys_device *dev, static ssize_t sched_mc_power_savings_store(struct sysdev_class *class,
struct sysdev_attribute *attr,
const char *buf, size_t count) const char *buf, size_t count)
{ {
return sched_power_savings_store(buf, count, 0); return sched_power_savings_store(buf, count, 0);
} }
static SYSDEV_ATTR(sched_mc_power_savings, 0644, sched_mc_power_savings_show, static SYSDEV_CLASS_ATTR(sched_mc_power_savings, 0644,
sched_mc_power_savings_store); sched_mc_power_savings_show,
sched_mc_power_savings_store);
#endif #endif
#ifdef CONFIG_SCHED_SMT #ifdef CONFIG_SCHED_SMT
static ssize_t sched_smt_power_savings_show(struct sys_device *dev, static ssize_t sched_smt_power_savings_show(struct sysdev_class *dev,
struct sysdev_attribute *attr, char *page) char *page)
{ {
return sprintf(page, "%u\n", sched_smt_power_savings); return sprintf(page, "%u\n", sched_smt_power_savings);
} }
static ssize_t sched_smt_power_savings_store(struct sys_device *dev, static ssize_t sched_smt_power_savings_store(struct sysdev_class *dev,
struct sysdev_attribute *attr,
const char *buf, size_t count) const char *buf, size_t count)
{ {
return sched_power_savings_store(buf, count, 1); return sched_power_savings_store(buf, count, 1);
} }
static SYSDEV_ATTR(sched_smt_power_savings, 0644, sched_smt_power_savings_show, static SYSDEV_CLASS_ATTR(sched_smt_power_savings, 0644,
sched_smt_power_savings_show,
sched_smt_power_savings_store); sched_smt_power_savings_store);
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment