578b333bfe
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> |
||
---|---|---|
.. | ||
dispatcher | ||
events | ||
executer | ||
hardware | ||
namespace | ||
parser | ||
resources | ||
sleep | ||
tables | ||
utilities | ||
ac.c | ||
acpi_memhotplug.c | ||
asus_acpi.c | ||
battery.c | ||
blacklist.c | ||
bus.c | ||
button.c | ||
container.c | ||
debug.c | ||
ec.c | ||
event.c | ||
fan.c | ||
glue.c | ||
hotkey.c | ||
ibm_acpi.c | ||
Kconfig | ||
Makefile | ||
motherboard.c | ||
numa.c | ||
osl.c | ||
pci_bind.c | ||
pci_irq.c | ||
pci_link.c | ||
pci_root.c | ||
power.c | ||
processor_core.c | ||
processor_idle.c | ||
processor_perflib.c | ||
processor_thermal.c | ||
processor_throttling.c | ||
scan.c | ||
system.c | ||
tables.c | ||
thermal.c | ||
toshiba_acpi.c | ||
utils.c | ||
video.c |