xen: no need to delay xen_setup_shutdown_event for hvm guests anymore
[firefly-linux-kernel-4.4.55.git] / drivers / xen / manage.c
index 24177272bcb84aed3ec51cb82f91535f0c034fc0..b2a8d7856ce39b99e793fda9992eba24bcd3c24f 100644 (file)
@@ -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);