diff options
author | Prarit Bhargava <prarit@redhat.com> | 2006-12-04 17:50:17 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-12-07 04:17:52 -0500 |
commit | 2548c06b72396e28abdb5dd572ab589c3c22f4b9 (patch) | |
tree | 775a13b80fdb463da66edf40211aff34f29f354f /drivers/acpi/dock.c | |
parent | c80fdbe81a617c82e2f95233f8ddcf046ffe21b3 (diff) |
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.c | 8 |
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) | |||
444 | */ | 444 | */ |
445 | int register_dock_notifier(struct notifier_block *nb) | 445 | int register_dock_notifier(struct notifier_block *nb) |
446 | { | 446 | { |
447 | if (!dock_station) | ||
448 | return -ENODEV; | ||
449 | |||
447 | return atomic_notifier_chain_register(&dock_notifier_list, nb); | 450 | return atomic_notifier_chain_register(&dock_notifier_list, nb); |
448 | } | 451 | } |
449 | 452 | ||
@@ -455,6 +458,9 @@ EXPORT_SYMBOL_GPL(register_dock_notifier); | |||
455 | */ | 458 | */ |
456 | void unregister_dock_notifier(struct notifier_block *nb) | 459 | void unregister_dock_notifier(struct notifier_block *nb) |
457 | { | 460 | { |
461 | if (!dock_station) | ||
462 | return; | ||
463 | |||
458 | atomic_notifier_chain_unregister(&dock_notifier_list, nb); | 464 | atomic_notifier_chain_unregister(&dock_notifier_list, nb); |
459 | } | 465 | } |
460 | 466 | ||
@@ -807,7 +813,7 @@ static int __init dock_init(void) | |||
807 | ACPI_UINT32_MAX, find_dock, &num, NULL); | 813 | ACPI_UINT32_MAX, find_dock, &num, NULL); |
808 | 814 | ||
809 | if (!num) | 815 | if (!num) |
810 | return -ENODEV; | 816 | printk(KERN_INFO "No dock devices found.\n"); |
811 | 817 | ||
812 | return 0; | 818 | return 0; |
813 | } | 819 | } |