diff options
Diffstat (limited to 'drivers/xen/xenbus/xenbus_probe.c')
-rw-r--r-- | drivers/xen/xenbus/xenbus_probe.c | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c index b2a03184a246..773d1cf23283 100644 --- a/drivers/xen/xenbus/xenbus_probe.c +++ b/drivers/xen/xenbus/xenbus_probe.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/ctype.h> | 40 | #include <linux/ctype.h> |
41 | #include <linux/fcntl.h> | 41 | #include <linux/fcntl.h> |
42 | #include <linux/mm.h> | 42 | #include <linux/mm.h> |
43 | #include <linux/proc_fs.h> | ||
43 | #include <linux/notifier.h> | 44 | #include <linux/notifier.h> |
44 | #include <linux/kthread.h> | 45 | #include <linux/kthread.h> |
45 | #include <linux/mutex.h> | 46 | #include <linux/mutex.h> |
@@ -55,7 +56,10 @@ | |||
55 | #include "xenbus_comms.h" | 56 | #include "xenbus_comms.h" |
56 | #include "xenbus_probe.h" | 57 | #include "xenbus_probe.h" |
57 | 58 | ||
59 | |||
58 | int xen_store_evtchn; | 60 | int xen_store_evtchn; |
61 | EXPORT_SYMBOL(xen_store_evtchn); | ||
62 | |||
59 | struct xenstore_domain_interface *xen_store_interface; | 63 | struct xenstore_domain_interface *xen_store_interface; |
60 | static unsigned long xen_store_mfn; | 64 | static unsigned long xen_store_mfn; |
61 | 65 | ||
@@ -166,6 +170,9 @@ static int read_backend_details(struct xenbus_device *xendev) | |||
166 | return read_otherend_details(xendev, "backend-id", "backend"); | 170 | return read_otherend_details(xendev, "backend-id", "backend"); |
167 | } | 171 | } |
168 | 172 | ||
173 | static struct device_attribute xenbus_dev_attrs[] = { | ||
174 | __ATTR_NULL | ||
175 | }; | ||
169 | 176 | ||
170 | /* Bus type for frontend drivers. */ | 177 | /* Bus type for frontend drivers. */ |
171 | static struct xen_bus_type xenbus_frontend = { | 178 | static struct xen_bus_type xenbus_frontend = { |
@@ -174,12 +181,13 @@ static struct xen_bus_type xenbus_frontend = { | |||
174 | .get_bus_id = frontend_bus_id, | 181 | .get_bus_id = frontend_bus_id, |
175 | .probe = xenbus_probe_frontend, | 182 | .probe = xenbus_probe_frontend, |
176 | .bus = { | 183 | .bus = { |
177 | .name = "xen", | 184 | .name = "xen", |
178 | .match = xenbus_match, | 185 | .match = xenbus_match, |
179 | .uevent = xenbus_uevent, | 186 | .uevent = xenbus_uevent, |
180 | .probe = xenbus_dev_probe, | 187 | .probe = xenbus_dev_probe, |
181 | .remove = xenbus_dev_remove, | 188 | .remove = xenbus_dev_remove, |
182 | .shutdown = xenbus_dev_shutdown, | 189 | .shutdown = xenbus_dev_shutdown, |
190 | .dev_attrs = xenbus_dev_attrs, | ||
183 | }, | 191 | }, |
184 | }; | 192 | }; |
185 | 193 | ||
@@ -852,6 +860,14 @@ static int __init xenbus_probe_init(void) | |||
852 | if (!xen_initial_domain()) | 860 | if (!xen_initial_domain()) |
853 | xenbus_probe(NULL); | 861 | xenbus_probe(NULL); |
854 | 862 | ||
863 | #ifdef CONFIG_XEN_COMPAT_XENFS | ||
864 | /* | ||
865 | * Create xenfs mountpoint in /proc for compatibility with | ||
866 | * utilities that expect to find "xenbus" under "/proc/xen". | ||
867 | */ | ||
868 | proc_mkdir("xen", NULL); | ||
869 | #endif | ||
870 | |||
855 | return 0; | 871 | return 0; |
856 | 872 | ||
857 | out_unreg_back: | 873 | out_unreg_back: |