summaryrefslogtreecommitdiffstats
path: root/drivers/xen/manage.c
diff options
context:
space:
mode:
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>2010-12-02 18:54:50 +0100
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>2011-02-25 17:43:03 +0100
commit702d4eb9b3de4398ab99cf0a4e799e552c7ab756 (patch)
tree8145ce0d54f4f3c3148e188d640f99fc305e8b2a /drivers/xen/manage.c
parentLinux 2.6.38-rc6 (diff)
downloadlinux-702d4eb9b3de4398ab99cf0a4e799e552c7ab756.tar.xz
linux-702d4eb9b3de4398ab99cf0a4e799e552c7ab756.zip
xen: no need to delay xen_setup_shutdown_event for hvm guests anymore
Now that xenstore_ready is used correctly for PV on HVM guests too, we don't need to delay the initialization of xen_setup_shutdown_event anymore. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>
Diffstat (limited to 'drivers/xen/manage.c')
-rw-r--r--drivers/xen/manage.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
index 24177272bcb8..b2a8d7856ce3 100644
--- a/drivers/xen/manage.c
+++ b/drivers/xen/manage.c
@@ -291,27 +291,18 @@ static int shutdown_event(struct notifier_block *notifier,
return NOTIFY_DONE;
}
-static int __init __setup_shutdown_event(void)
-{
- /* Delay initialization in the PV on HVM case */
- if (xen_hvm_domain())
- return 0;
-
- if (!xen_pv_domain())
- return -ENODEV;
-
- return xen_setup_shutdown_event();
-}
-
int xen_setup_shutdown_event(void)
{
static struct notifier_block xenstore_notifier = {
.notifier_call = shutdown_event
};
+
+ if (!xen_domain())
+ return -ENODEV;
register_xenstore_notifier(&xenstore_notifier);
return 0;
}
EXPORT_SYMBOL_GPL(xen_setup_shutdown_event);
-subsys_initcall(__setup_shutdown_event);
+subsys_initcall(xen_setup_shutdown_event);