linux-kernel-test/drivers/acpi
Bjorn Helgaas 578b333bfe ACPI: update asus_acpi driver registration to unload on failure
Remove the assumption that acpi_bus_register_driver() returns the number of
devices claimed.  Returning the count is unreliable because devices may be
hot-plugged in the future (admittedly not applicable for this driver).

Since the hardware for this driver is not hot-pluggable, determine whether the
hardware is present by noticing calls to the .add() method.  It would be
better to probe the ACPI namespace for the ASUS HIDs, and load the driver only
when we find one, but ACPI doesn't support that yet.

I don't have an ASUS laptop to test on, but on my HP dl360, it does report the
appropriate error when attempting to load the module:

    $ sudo insmod drivers/acpi/asus_acpi.ko
    insmod: error inserting 'drivers/acpi/asus_acpi.ko': -1 No such device

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-01 21:48:08 -05:00
..
dispatcher [ACPI] ACPICA 20060127 2006-01-31 03:25:09 -05:00
events [ACPI] ACPICA 20060127 2006-01-31 03:25:09 -05:00
executer [ACPI] ACPICA 20060127 2006-01-31 03:25:09 -05:00
hardware [ACPI] ACPICA 20060127 2006-01-31 03:25:09 -05:00
namespace [ACPI] ACPICA 20060127 2006-01-31 03:25:09 -05:00
parser [ACPI] ACPICA 20060127 2006-01-31 03:25:09 -05:00
resources [PATCH] ACPI: fix vendor resource length computation 2006-02-17 14:09:22 -08:00
sleep [ACPI] fix reboot upon suspend-to-disk 2005-12-15 13:28:14 -05:00
tables [ACPI] ACPICA 20060127 2006-01-31 03:25:09 -05:00
utilities [ACPI] ACPICA 20060127 2006-01-31 03:25:09 -05:00
ac.c [ACPI] Lindent all ACPI files 2005-08-05 00:45:14 -04:00
acpi_memhotplug.c [ACPI] acpi_memhotplug.c build fix 2006-01-07 04:43:40 -05:00
asus_acpi.c ACPI: update asus_acpi driver registration to unload on failure 2006-04-01 21:48:08 -05:00
battery.c [ACPI] Lindent all ACPI files 2005-08-05 00:45:14 -04:00
blacklist.c [PATCH] x86_64: Clean up and tweak ACPI blacklist year code 2006-03-25 09:10:54 -08:00
bus.c [PATCH] move pm_register/etc. to CONFIG_PM_LEGACY, pm_legacy.h 2005-11-13 18:14:10 -08:00
button.c [ACPI] Lindent all ACPI files 2005-08-05 00:45:14 -04:00
container.c [PATCH] driver core: replace "hotplug" by "uevent" 2006-01-04 16:18:08 -08:00
debug.c [ACPI] Lindent all ACPI files 2005-08-05 00:45:14 -04:00
ec.c [PATCH] Don't pass boot parameters to argv_init[] 2006-03-31 12:18:53 -08:00
event.c [PATCH] Fix /proc/acpi/events around suspend 2005-10-17 17:03:57 -07:00
fan.c [ACPI] Lindent all ACPI files 2005-08-05 00:45:14 -04:00
glue.c [ACPI] ACPICA 20050930 2005-12-10 00:20:25 -05:00
hotkey.c [ACPI] Lindent all ACPI files 2005-08-05 00:45:14 -04:00
ibm_acpi.c [PATCH] acpi: remove dock event handling from ibm_acpi 2006-03-23 14:35:15 -08:00
Kconfig fix typos "wich" -> "which" 2006-03-24 18:23:14 +01:00
Makefile [ACPI] IA64 build: blacklist.c is used only on X86 2005-11-30 21:59:35 -05:00
motherboard.c [ACPI] ACPICA 20050930 2005-12-10 00:20:25 -05:00
numa.c [ACPI] Lindent all ACPI files 2005-08-05 00:45:14 -04:00
osl.c [PATCH] ACPI: clean up memory attribute checking for map/read/write 2006-03-26 08:56:54 -08:00
pci_bind.c [ACPI] add static to function definitions 2005-09-03 00:20:13 -04:00
pci_irq.c [ACPI] merge 3549 4320 4485 4588 4980 5483 5651 acpica asus fops pnpacpi branches into release 2006-01-24 17:52:48 -05:00
pci_link.c [ACPI] remove "Resource isn't an IRQ" warning 2006-01-26 17:23:38 -05:00
pci_root.c [ACPI] ACPICA 20050930 2005-12-10 00:20:25 -05:00
power.c [ACPI] Lindent all ACPI files 2005-08-05 00:45:14 -04:00
processor_core.c [PATCH] more s/fucn/func/ typo fixes 2006-03-26 08:57:09 -08:00
processor_idle.c [PATCH] Fix compilation of processor_idle.c on IA64 2006-03-25 20:19:29 -08:00
processor_perflib.c [ACPI] merge 3549 4320 4485 4588 4980 5483 5651 acpica asus fops pnpacpi branches into release 2006-01-24 17:52:48 -05:00
processor_thermal.c [ACPI] make two processor functions static 2006-01-08 03:05:59 -05:00
processor_throttling.c [ACPI] make two processor functions static 2006-01-08 03:05:59 -05:00
scan.c ACPI: make acpi_bus_register_driver() return success/failure, not device count 2006-04-01 21:42:57 -05:00
system.c [ACPI] Lindent all ACPI files 2005-08-05 00:45:14 -04:00
tables.c [PATCH] EFI fixes 2006-03-26 08:56:54 -08:00
thermal.c [ACPI] Allow return to active cooling mode once passive mode is entered 2005-11-30 22:51:04 -05:00
toshiba_acpi.c [ACPI] Lindent all ACPI files 2005-08-05 00:45:14 -04:00
utils.c [ACPI] Lindent all ACPI files 2005-08-05 00:45:14 -04:00
video.c [ACPI] move some run-time structure inits to compile time 2006-01-07 04:19:08 -05:00