linux/drivers/pci
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
..
hotplug sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
pcie Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00
.gitignore Add some basic .gitignore files 2005-10-18 08:26:15 -07:00
access.c [PATCH] severing module.h->sched.h 2006-12-04 02:00:22 -05:00
bus.c pci: do not mark exported functions as __devinit 2007-05-02 19:02:35 -07:00
hotplug.c [PATCH] driver core: replace "hotplug" by "uevent" 2006-01-04 16:18:08 -08:00
htirq.c PCI: Use pci_find_ht_capability() in drivers/pci/htirq.c 2006-12-20 10:54:42 -08:00
Kconfig PCI: remove the broken PCI_MULTITHREAD_PROBE option 2007-05-02 19:02:38 -07:00
Makefile [PATCH] htirq: tidy up the htirq code 2006-10-04 07:55:30 -07:00
msi.c msi: mask the msix vector before we unmap it 2007-06-01 08:18:27 -07:00
msi.h PCI: Make some MSI-X #defines generic 2006-12-01 14:36:56 -08:00
pci-acpi.c ACPI: Disable MSI on request of FADT 2007-04-25 01:13:47 -04:00
pci-driver.c Fix more "deprecated" spellos. 2007-05-09 07:19:14 +02:00
pci-sysfs.c sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
pci.c pci: do not mark exported functions as __devinit 2007-05-02 19:02:35 -07:00
pci.h MSI: Use a list instead of the custom link structure 2007-05-02 19:02:37 -07:00
probe.c sysfs: kill unnecessary attribute->owner 2007-07-11 16:09:06 -07:00
proc.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
quirks.c PCI: quirk disable MSI on via vt3351 2007-05-31 16:56:37 -07:00
remove.c PCI: add pci_stop_bus_device 2006-09-26 17:43:54 -07:00
rom.c Altix: Initial ACPI support - ROM shadowing. 2006-12-01 14:36:58 -08:00
search.c PCI: Fix pci_find_present 2007-05-31 16:56:37 -07:00
setup-bus.c pci: do not mark exported functions as __devinit 2007-05-02 19:02:35 -07:00
setup-irq.c PCI: PCI devices get assigned redundant IRQs 2007-02-16 15:30:10 -08:00
setup-res.c pci: do not mark exported functions as __devinit 2007-05-02 19:02:35 -07:00
syscall.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00