]> err.no Git - linux-2.6/commit
sysdev: Pass the attribute to the low level sysdev show/store function
authorAndi Kleen <andi@firstfloor.org>
Tue, 1 Jul 2008 16:48:41 +0000 (18:48 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 22 Jul 2008 04:55:02 +0000 (21:55 -0700)
commit4a0b2b4dbe1335b8b9886ba3dc85a145d5d938ed
treec2d3a0f86ade5061a1bb9a14aa702323d729fd54
parent36ce6dad6e3cb3f050ed41e0beac0070d2062b25
sysdev: Pass the attribute to the low level sysdev show/store function

This allow to dynamically generate attributes and share show/store
functions between attributes. Right now most attributes are generated
by special macros and lots of duplicated code. With the attribute
passed it's instead possible to attach some data to the attribute
and then use that in shared low level functions to do different things.

I need this for the dynamically generated bank attributes in the x86
machine check code, but it'll allow some further cleanups.

I converted all users in tree to the new show/store prototype. It's a single
huge patch to avoid unbisectable sections.

Runtime tested: x86-32, x86-64
Compiled only: ia64, powerpc
Not compile tested/only grep converted: sh, arm, avr32

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
24 files changed:
arch/arm/kernel/time.c
arch/avr32/kernel/cpu.c
arch/ia64/kernel/err_inject.c
arch/powerpc/kernel/sysfs.c
arch/powerpc/platforms/cell/cbe_thermal.c
arch/powerpc/platforms/cell/spu_base.c
arch/s390/kernel/smp.c
arch/s390/kernel/time.c
arch/sh/drivers/dma/dma-sysfs.c
arch/sparc64/kernel/sysfs.c
arch/x86/kernel/cpu/mcheck/mce_64.c
arch/x86/kernel/cpu/mcheck/therm_throt.c
arch/x86/kernel/microcode.c
drivers/base/cpu.c
drivers/base/memory.c
drivers/base/node.c
drivers/base/sys.c
drivers/base/topology.c
drivers/cpuidle/sysfs.c
drivers/xen/balloon.c
include/linux/sysdev.h
kernel/rtmutex-tester.c
kernel/sched.c
kernel/time/clocksource.c