From: Prarit Bhargava <[EMAIL PROTECTED]>

Fix bug which will cause acpiphp to not be able to load when dock.ko
cannot load.

Signed-off-by: Prarit Bhargava <[EMAIL PROTECTED]>
Signed-off-by: Kristen Carlson Accardi <[EMAIL PROTECTED]>

---
 drivers/acpi/dock.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

--- kristen-2.6.orig/drivers/acpi/dock.c
+++ kristen-2.6/drivers/acpi/dock.c
@@ -443,6 +443,9 @@ static int dock_in_progress(struct dock_
  */
 int register_dock_notifier(struct notifier_block *nb)
 {
+       if (!dock_station)
+               return -ENODEV;
+
        return atomic_notifier_chain_register(&dock_notifier_list, nb);
 }
 
@@ -454,6 +457,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);
 }
 
@@ -806,7 +812,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;
 }

--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to