android_kernel_samsung_msm8976/drivers
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
..
acorn [PATCH] fix request->cmd == INT cases 2007-07-10 08:03:34 +02:00
acpi
amba
ata [libata] sata_mv: print out additional chip info during probe 2007-07-09 12:29:31 -04:00
atm
auxdisplay
base sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
block sysfs: kill unnecessary attribute->owner 2007-07-11 16:09:06 -07:00
bluetooth
cdrom Remove legacy CDROM drivers 2007-07-10 08:03:34 +02:00
char sysfs: kill unnecessary attribute->owner 2007-07-11 16:09:06 -07:00
clocksource
connector
cpufreq sysfs: kill unnecessary attribute->owner 2007-07-11 16:09:06 -07:00
crypto
dio
dma
edac
eisa
fc4
firewire firewire: fw-sbp2: fix DMA mapping of management ORBs 2007-07-10 00:07:49 +02:00
firmware sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
hid Merge branches 'debug-module-param' and 'upstream' into for-linus 2007-07-09 14:23:37 +02:00
hwmon
i2c sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
ide [PATCH] fix request->cmd == INT cases 2007-07-10 08:03:34 +02:00
ieee1394 ieee1394: remove old isochronous ABI 2007-07-10 00:07:41 +02:00
infiniband sysfs: kill unnecessary attribute->owner 2007-07-11 16:09:06 -07:00
input sysfs: kill unnecessary attribute->owner 2007-07-11 16:09:06 -07:00
isdn
kvm
leds
macintosh sysfs: kill unnecessary attribute->owner 2007-07-11 16:09:06 -07:00
mca
md
media
message
mfd
misc sysfs: kill unnecessary attribute->owner 2007-07-11 16:09:06 -07:00
mmc mmc: at91_mci: fix hanging and rework to match flowcharts 2007-07-09 21:29:07 +02:00
mtd [MIPS] remove LASAT Networks platforms support 2007-07-10 17:33:04 +01:00
net sysfs: kill unnecessary attribute->owner 2007-07-11 16:09:06 -07:00
nubus
oprofile
parisc sysfs: kill unnecessary attribute->owner 2007-07-11 16:09:06 -07:00
parport
pci sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
pcmcia sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
pnp
power [BATTERY] One Laptop Per Child power/battery driver 2007-07-10 11:28:22 +01:00
ps3
rapidio sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
rtc sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
s390 sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
sbus
scsi sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
serial
sh
sn
spi sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
tc [MIPS] DEC: Fix modpost warning. 2007-07-10 17:33:05 +01:00
telephony
usb PM: Remove prev_state from struct dev_pm_info 2007-07-11 16:09:02 -07:00
video sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
w1 sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
zorro sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
Kconfig Merge git://git.infradead.org/~dwmw2/battery-2.6 2007-07-10 14:47:59 -07:00
Makefile [BATTERY] Universal power supply class (was: battery class) 2007-07-10 11:25:44 +01:00