]> err.no Git - linux-2.6/commitdiff
ACPI: dock: Fix symbol conflict between acpiphp and dock
authorPrarit Bhargava <prarit@redhat.com>
Mon, 4 Dec 2006 22:50:17 +0000 (14:50 -0800)
committerLen Brown <len.brown@intel.com>
Thu, 7 Dec 2006 09:17:52 +0000 (04:17 -0500)
Fix bug which will cause acpiphp to not be able to load when dock.ko
cannot load.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/dock.c

index e4c1a4ff4e31c5e8123c83897da867fd4a84e00e..8c6828bee5d97fbd536e9fa90e3022f94192da3b 100644 (file)
@@ -444,6 +444,9 @@ static int dock_in_progress(struct dock_station *ds)
  */
 int register_dock_notifier(struct notifier_block *nb)
 {
+       if (!dock_station)
+               return -ENODEV;
+
        return atomic_notifier_chain_register(&dock_notifier_list, nb);
 }
 
@@ -455,6 +458,9 @@ EXPORT_SYMBOL_GPL(register_dock_notifier);
  */
 void unregister_dock_notifier(struct notifier_block *nb)
 {
+       if (!dock_station)
+               return;
+
        atomic_notifier_chain_unregister(&dock_notifier_list, nb);
 }
 
@@ -807,7 +813,7 @@ static int __init dock_init(void)
                            ACPI_UINT32_MAX, find_dock, &num, NULL);
 
        if (!num)
-               return -ENODEV;
+               printk(KERN_INFO "No dock devices found.\n");
 
        return 0;
 }