]> err.no Git - linux-2.6/commit
ACPI: fix sonypi ACPI driver registration to unregister on failure
authorBjorn Helgaas <bjorn.helgaas@hp.com>
Tue, 28 Mar 2006 22:04:00 +0000 (17:04 -0500)
committerLen Brown <len.brown@intel.com>
Sun, 2 Apr 2006 02:48:08 +0000 (21:48 -0500)
commite4513a57ef719d3d6d1cee0ca4d9f4016aa452bb
treee4b837a10ada6c1d8ecfb065cb864c556a4641ce
parent578b333bfe8eb1360207a08a53c321822a8f40f3
ACPI: fix sonypi ACPI driver registration to unregister 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).

This also fixes a bug: if sonypi_acpi_driver was registered but found no
devices, sonypi_exit() did not unregister it.

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>
drivers/char/sonypi.c