aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen/xenbus/xenbus_probe.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/xen/xenbus/xenbus_probe.h')
-rw-r--r--drivers/xen/xenbus/xenbus_probe.h31
1 files changed, 16 insertions, 15 deletions
diff --git a/drivers/xen/xenbus/xenbus_probe.h b/drivers/xen/xenbus/xenbus_probe.h
index 6c5e3185a6a2..24665812316a 100644
--- a/drivers/xen/xenbus/xenbus_probe.h
+++ b/drivers/xen/xenbus/xenbus_probe.h
@@ -36,26 +36,15 @@
36 36
37#define XEN_BUS_ID_SIZE 20 37#define XEN_BUS_ID_SIZE 20
38 38
39#ifdef CONFIG_XEN_BACKEND
40extern void xenbus_backend_suspend(int (*fn)(struct device *, void *));
41extern void xenbus_backend_resume(int (*fn)(struct device *, void *));
42extern void xenbus_backend_probe_and_watch(void);
43extern int xenbus_backend_bus_register(void);
44extern void xenbus_backend_bus_unregister(void);
45#else
46static inline void xenbus_backend_suspend(int (*fn)(struct device *, void *)) {}
47static inline void xenbus_backend_resume(int (*fn)(struct device *, void *)) {}
48static inline void xenbus_backend_probe_and_watch(void) {}
49static inline int xenbus_backend_bus_register(void) { return 0; }
50static inline void xenbus_backend_bus_unregister(void) {}
51#endif
52
53struct xen_bus_type 39struct xen_bus_type
54{ 40{
55 char *root; 41 char *root;
56 unsigned int levels; 42 unsigned int levels;
57 int (*get_bus_id)(char bus_id[XEN_BUS_ID_SIZE], const char *nodename); 43 int (*get_bus_id)(char bus_id[XEN_BUS_ID_SIZE], const char *nodename);
58 int (*probe)(const char *type, const char *dir); 44 int (*probe)(struct xen_bus_type *bus, const char *type,
45 const char *dir);
46 void (*otherend_changed)(struct xenbus_watch *watch, const char **vec,
47 unsigned int len);
59 struct bus_type bus; 48 struct bus_type bus;
60}; 49};
61 50
@@ -73,4 +62,16 @@ extern int xenbus_probe_devices(struct xen_bus_type *bus);
73 62
74extern void xenbus_dev_changed(const char *node, struct xen_bus_type *bus); 63extern void xenbus_dev_changed(const char *node, struct xen_bus_type *bus);
75 64
65extern void xenbus_dev_shutdown(struct device *_dev);
66
67extern int xenbus_dev_suspend(struct device *dev, pm_message_t state);
68extern int xenbus_dev_resume(struct device *dev);
69
70extern void xenbus_otherend_changed(struct xenbus_watch *watch,
71 const char **vec, unsigned int len,
72 int ignore_on_shutdown);
73
74extern int xenbus_read_otherend_details(struct xenbus_device *xendev,
75 char *id_node, char *path_node);
76
76#endif 77#endif