Skip to content

Commit

Permalink
ACPI: dock: Fix symbol conflict between acpiphp and dock
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Prarit Bhargava authored and Len Brown committed Dec 7, 2006
1 parent c80fdbe commit 2548c06
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/acpi/dock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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);
}

Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 2548c06

Please sign in to comment.