Skip to content

Commit 6c1733a

Browse files
committed
sysdev: fix up the probe/release attributes
These should be sysdev attributes, not class attributes. This patch should resolve the problem. Thanks to Stephen Rothwell for pointing out the problem. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Andi Kleen <andi@firstfloor.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1 parent c607cf0 commit 6c1733a

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎drivers/base/cpu.c‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,24 +79,24 @@ void unregister_cpu(struct cpu *cpu)
7979
}
8080

8181
#ifdef CONFIG_ARCH_CPU_PROBE_RELEASE
82-
static ssize_t cpu_probe_store(struct class *class,
83-
struct class_attribute *attr,
82+
static ssize_t cpu_probe_store(struct sys_device *dev,
83+
struct sysdev_attribute *attr,
8484
const char *buf,
8585
size_t count)
8686
{
8787
return arch_cpu_probe(buf, count);
8888
}
8989

90-
static ssize_t cpu_release_store(struct class *class,
91-
struct class_attribute *attr,
90+
static ssize_t cpu_release_store(struct sys_device *dev,
91+
struct sysdev_attribute *attr,
9292
const char *buf,
9393
size_t count)
9494
{
9595
return arch_cpu_release(buf, count);
9696
}
9797

98-
static CLASS_ATTR(probe, S_IWUSR, NULL, cpu_probe_store);
99-
static CLASS_ATTR(release, S_IWUSR, NULL, cpu_release_store);
98+
static SYSDEV_ATTR(probe, S_IWUSR, NULL, cpu_probe_store);
99+
static SYSDEV_ATTR(release, S_IWUSR, NULL, cpu_release_store);
100100
#endif /* CONFIG_ARCH_CPU_PROBE_RELEASE */
101101

102102
#else /* ... !CONFIG_HOTPLUG_CPU */
@@ -261,8 +261,8 @@ int __init cpu_dev_init(void)
261261

262262
static struct sysdev_class_attribute *cpu_sysdev_class_attrs[] = {
263263
#ifdef CONFIG_ARCH_CPU_PROBE_RELEASE
264-
&class_attr_probe.attr,
265-
&class_attr_release.attr,
264+
&attr_probe,
265+
&attr_release,
266266
#endif
267267
&cpu_attrs[0].attr,
268268
&cpu_attrs[1].attr,

0 commit comments

Comments
 (0)