xen: separate out frontend xenbus
Impact: refactor Make a distinct frontend xenbus, in preparation for adding a backend xenbus. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> [corresponds to 2fd433a4188f in git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git with adjustments to reflect changes in the code which is moved] Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
This commit is contained in:
committed by
Konrad Rzeszutek Wilk
parent
cf7d7e5a19
commit
2de06cc1f1
@@ -36,26 +36,13 @@
|
||||
|
||||
#define XEN_BUS_ID_SIZE 20
|
||||
|
||||
#ifdef CONFIG_XEN_BACKEND
|
||||
extern void xenbus_backend_suspend(int (*fn)(struct device *, void *));
|
||||
extern void xenbus_backend_resume(int (*fn)(struct device *, void *));
|
||||
extern void xenbus_backend_probe_and_watch(void);
|
||||
extern int xenbus_backend_bus_register(void);
|
||||
extern void xenbus_backend_bus_unregister(void);
|
||||
#else
|
||||
static inline void xenbus_backend_suspend(int (*fn)(struct device *, void *)) {}
|
||||
static inline void xenbus_backend_resume(int (*fn)(struct device *, void *)) {}
|
||||
static inline void xenbus_backend_probe_and_watch(void) {}
|
||||
static inline int xenbus_backend_bus_register(void) { return 0; }
|
||||
static inline void xenbus_backend_bus_unregister(void) {}
|
||||
#endif
|
||||
|
||||
struct xen_bus_type
|
||||
{
|
||||
char *root;
|
||||
unsigned int levels;
|
||||
int (*get_bus_id)(char bus_id[XEN_BUS_ID_SIZE], const char *nodename);
|
||||
int (*probe)(const char *type, const char *dir);
|
||||
int (*probe)(struct xen_bus_type *bus, const char *type, const char *dir);
|
||||
void (*otherend_changed)(struct xenbus_watch *watch, const char **vec, unsigned int len);
|
||||
struct bus_type bus;
|
||||
};
|
||||
|
||||
@@ -73,4 +60,17 @@ extern int xenbus_probe_devices(struct xen_bus_type *bus);
|
||||
|
||||
extern void xenbus_dev_changed(const char *node, struct xen_bus_type *bus);
|
||||
|
||||
extern int xenbus_uevent(struct device *_dev, struct kobj_uevent_env *env);
|
||||
extern void xenbus_dev_shutdown(struct device *_dev);
|
||||
|
||||
extern int xenbus_dev_suspend(struct device *dev, pm_message_t state);
|
||||
extern int xenbus_dev_resume(struct device *dev);
|
||||
|
||||
extern void xenbus_otherend_changed(struct xenbus_watch *watch,
|
||||
const char **vec, unsigned int len,
|
||||
int ignore_on_shutdown);
|
||||
|
||||
extern int xenbus_read_otherend_details(struct xenbus_device *xendev,
|
||||
char *id_node, char *path_node);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user