linux/drivers/platform/x86
Alan Jenkins 854c78363f eeepc-laptop: callbacks should use "driver data" parameter or field
Callback methods should not refer to a variable like "eeepc" (formally
"ehotk").  Instead, they should extract the data they need either from
a "driver data" parameter, or the "driver data" field of the object
which they operate on.  The "eeepc" variable can then be removed.

In practice, drivers under "drivers/platform" can get away without using
driver data, because it doesn't make sense to have more than one
instance of them.  However this makes it harder to review them for
correctness.  This is especially true for core ACPI developers who have
not previously been exposed to this anti-pattern :-).

This will serve as an example of best practice for new driver writers
(whether they find it themselves, or have it pointed out during review
:-).

The hwmon sub-device is a special case.  It uses ec_{read,write} which
are defined to communicate with the (first) EC, so it does not require
any driver data.  It should still only be instantiated in the context of
an ASUS010 device because we don't have a safe way to probe for it.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
CC: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-12-09 15:54:32 -05:00
..
acer-wmi.c Input: libps2 - additional locking for i8042 ports 2009-09-17 23:23:45 -07:00
acerhdf.c acerhdf: return temperature in milidegree instead of degree 2009-11-25 00:51:00 -05:00
asus-laptop.c asus-laptop: set acpi_driver.owner 2009-12-09 15:54:30 -05:00
asus_acpi.c asus-acpi: set acpi_driver.owner 2009-12-09 15:54:30 -05:00
compal-laptop.c
dell-laptop.c dell-laptop: fix rfkill conversion 2009-06-15 15:05:58 -04:00
dell-wmi.c dell-wmi: don't generate errors on empty messages 2009-06-17 23:44:22 -04:00
eeepc-laptop.c eeepc-laptop: callbacks should use "driver data" parameter or field 2009-12-09 15:54:32 -05:00
fujitsu-laptop.c fujitsu-laptop: address missed led-class ifdef fixup 2009-10-09 16:49:57 -04:00
hp-wmi.c Merge branch 'misc-2.6.32' into release 2009-09-19 02:14:45 -04:00
intel_menlow.c thermal: use integers rather than strings for thermal values 2009-02-20 10:52:37 -05:00
Kconfig eeepc-laptop: add touchpad led 2009-12-09 15:54:30 -05:00
Makefile topstar-laptop: add new driver for hotkeys support on Topstar N01 2009-09-19 01:16:13 -04:00
msi-laptop.c
panasonic-laptop.c Merge branches 'release', 'APERF', 'ARAT', 'misc', 'kelvin', 'device-lock' and 'bjorn.notify' into release 2009-04-07 18:18:42 -04:00
sony-laptop.c Merge branches 'sony-laptop', 'bugzilla-14247' and 'bugzilla-14271' into release 2009-10-02 11:27:57 -04:00
tc1100-wmi.c tc1100-wmi: Fix state reporting 2009-04-03 12:03:27 -04:00
thinkpad_acpi.c thinkpad-acpi: fix detection of old ThinkPads 2009-11-25 00:42:15 -05:00
topstar-laptop.c topstar-laptop: add new driver for hotkeys support on Topstar N01 2009-09-19 01:16:13 -04:00
toshiba_acpi.c toshiba_acpi: return on a fail path 2009-08-28 15:17:07 -04:00
wmi.c ACPI: Move definition of PREFIX from acpi_bus.h to internal..h 2009-08-28 19:57:27 -04:00