提交 2548c06b 编写于 作者: P Prarit Bhargava 提交者: Len Brown

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: NPrarit Bhargava <prarit@redhat.com>
Signed-off-by: NKristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 c80fdbe8
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册