diff options
Diffstat (limited to 'drivers/xen/xenbus/xenbus_probe.c')
-rw-r--r-- | drivers/xen/xenbus/xenbus_probe.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c index d96fa75b45ec..a9e83c438cbb 100644 --- a/drivers/xen/xenbus/xenbus_probe.c +++ b/drivers/xen/xenbus/xenbus_probe.c | |||
@@ -781,8 +781,23 @@ void xenbus_probe(struct work_struct *unused) | |||
781 | /* Notify others that xenstore is up */ | 781 | /* Notify others that xenstore is up */ |
782 | blocking_notifier_call_chain(&xenstore_chain, 0, NULL); | 782 | blocking_notifier_call_chain(&xenstore_chain, 0, NULL); |
783 | } | 783 | } |
784 | EXPORT_SYMBOL_GPL(xenbus_probe); | ||
784 | 785 | ||
785 | static int __init xenbus_probe_init(void) | 786 | static int __init xenbus_probe_initcall(void) |
787 | { | ||
788 | if (!xen_domain()) | ||
789 | return -ENODEV; | ||
790 | |||
791 | if (xen_initial_domain() || xen_hvm_domain()) | ||
792 | return 0; | ||
793 | |||
794 | xenbus_probe(NULL); | ||
795 | return 0; | ||
796 | } | ||
797 | |||
798 | device_initcall(xenbus_probe_initcall); | ||
799 | |||
800 | static int __init xenbus_init(void) | ||
786 | { | 801 | { |
787 | int err = 0; | 802 | int err = 0; |
788 | 803 | ||
@@ -834,9 +849,6 @@ static int __init xenbus_probe_init(void) | |||
834 | goto out_unreg_back; | 849 | goto out_unreg_back; |
835 | } | 850 | } |
836 | 851 | ||
837 | if (!xen_initial_domain()) | ||
838 | xenbus_probe(NULL); | ||
839 | |||
840 | #ifdef CONFIG_XEN_COMPAT_XENFS | 852 | #ifdef CONFIG_XEN_COMPAT_XENFS |
841 | /* | 853 | /* |
842 | * Create xenfs mountpoint in /proc for compatibility with | 854 | * Create xenfs mountpoint in /proc for compatibility with |
@@ -857,7 +869,7 @@ static int __init xenbus_probe_init(void) | |||
857 | return err; | 869 | return err; |
858 | } | 870 | } |
859 | 871 | ||
860 | postcore_initcall(xenbus_probe_init); | 872 | postcore_initcall(xenbus_init); |
861 | 873 | ||
862 | MODULE_LICENSE("GPL"); | 874 | MODULE_LICENSE("GPL"); |
863 | 875 | ||