summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/dock.c
diff options
context:
space:
mode:
authorPrarit Bhargava <prarit@redhat.com>2006-12-04 23:50:17 +0100
committerLen Brown <len.brown@intel.com>2006-12-07 10:17:52 +0100
commit2548c06b72396e28abdb5dd572ab589c3c22f4b9 (patch)
tree775a13b80fdb463da66edf40211aff34f29f354f /drivers/acpi/dock.c
parentACPI: dock: Add a docked sysfs file to the dock driver. (diff)
downloadlinux-2548c06b72396e28abdb5dd572ab589c3c22f4b9.tar.xz
linux-2548c06b72396e28abdb5dd572ab589c3c22f4b9.zip
ACPI: dock: Fix symbol conflict between acpiphp and dock
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>
Diffstat (limited to 'drivers/acpi/dock.c')
-rw-r--r--drivers/acpi/dock.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
index e4c1a4ff4e31..8c6828bee5d9 100644
--- a/drivers/acpi/dock.c
+++ b/drivers/acpi/dock.c
@@ -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;
}