android_kernel_samsung_msm8976/include
Zhang Rui 91a6902958 sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes
Well, first of all, I don't want to change so many files either.

What I do:
Adding a new parameter "struct bin_attribute *" in the
.read/.write methods for the sysfs binary attributes.

In fact, only the four lines change in fs/sysfs/bin.c and
include/linux/sysfs.h do the real work.
But I have to update all the files that use binary attributes
to make them compatible with the new .read and .write methods.
I'm not sure if I missed any. :(

Why I do this:
For a sysfs attribute, we can get a pointer pointing to the
struct attribute in the .show/.store method,
while we can't do this for the binary attributes.
I don't know why this is different, but this does make it not
so handy to use the binary attributes as the regular ones.
So I think this patch is reasonable. :)

Who benefits from it:
The patch that exposes ACPI tables in sysfs
requires such an improvement.
All the table binary attributes share the same .read method.
Parameter "struct bin_attribute *" is used to get
the table signature and instance number which are used to
distinguish different ACPI table binary attributes.

Without this parameter, we need to offer different .read methods
for different ACPI table binary attributes.
This is impossible as there are various ACPI tables on different
platforms, and we don't know what they are until they are loaded.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-11 16:09:09 -07:00
..
acpi Pull osi-now into release branch 2007-06-02 01:02:09 -04:00
asm-alpha ALPHA: misc fixes 2007-06-01 08:18:29 -07:00
asm-arm Introduce fixed sys_sync_file_range2() syscall, implement on PowerPC and ARM 2007-06-28 11:38:30 -07:00
asm-arm26 lots-of-architectures: enable arbitary speed tty support 2007-07-10 17:51:13 -07:00
asm-avr32 lots-of-architectures: enable arbitary speed tty support 2007-07-10 17:51:13 -07:00
asm-blackfin lots-of-architectures: enable arbitary speed tty support 2007-07-10 17:51:13 -07:00
asm-cris lots-of-architectures: enable arbitary speed tty support 2007-07-10 17:51:13 -07:00
asm-frv lots-of-architectures: enable arbitary speed tty support 2007-07-10 17:51:13 -07:00
asm-generic sched: simplify sched_find_first_bit() 2007-07-09 18:52:00 +02:00
asm-h8300 lots-of-architectures: enable arbitary speed tty support 2007-07-10 17:51:13 -07:00
asm-i386 i386: es7000 build breakage fix 2007-07-06 10:23:43 -07:00
asm-ia64 lots-of-architectures: enable arbitary speed tty support 2007-07-10 17:51:13 -07:00
asm-m32r lots-of-architectures: enable arbitary speed tty support 2007-07-10 17:51:13 -07:00
asm-m68k lots-of-architectures: enable arbitary speed tty support 2007-07-10 17:51:13 -07:00
asm-m68knommu
asm-mips lots-of-architectures: enable arbitary speed tty support 2007-07-10 17:51:13 -07:00
asm-parisc lots-of-architectures: enable arbitary speed tty support 2007-07-10 17:51:13 -07:00
asm-powerpc [POWERPC] Uninline and export virq_to_hw() for the pasemi_mac driver 2007-07-02 13:29:21 +10:00
asm-ppc Rework ptep_set_access_flags and fix sun4c 2007-06-16 13:16:16 -07:00
asm-s390 lots-of-architectures: enable arbitary speed tty support 2007-07-10 17:51:13 -07:00
asm-sh lots-of-architectures: enable arbitary speed tty support 2007-07-10 17:51:13 -07:00
asm-sh64
asm-sparc Rework ptep_set_access_flags and fix sun4c 2007-06-16 13:16:16 -07:00
asm-sparc64 [SPARC64]: Add linux/pagemap.h to asm/tlb.h 2007-06-28 21:25:31 -07:00
asm-um uml: add asm/paravirt.h 2007-06-24 08:59:11 -07:00
asm-v850 lots-of-architectures: enable arbitary speed tty support 2007-07-10 17:51:13 -07:00
asm-x86_64 x86_64: Fix eventd/timerfd syscalls 2007-06-20 14:27:25 -07:00
asm-xtensa lots-of-architectures: enable arbitary speed tty support 2007-07-10 17:51:13 -07:00
crypto
keys
linux sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
math-emu
media
mtd
net AX88796 network driver 2007-07-10 12:41:08 -04:00
pcmcia PCMCIA-NETDEV : add new ID of lan&modem multifunction card 2007-07-08 22:16:39 -04:00
rdma Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband 2007-05-21 16:19:32 -07:00
rxrpc
scsi
sound [ALSA] version 1.0.14 2007-05-31 11:03:27 +02:00
video
Kbuild