V4L/DVB (11426): gspca - m5602: Don't touch hflip/vflip register on Read/Modify/Write
[linux-2.6/verdex.git] / drivers / xen / xenbus / xenbus_probe.h
blob6c5e3185a6a24d7edb317106d252fb2e08eafd07
1 /******************************************************************************
2 * xenbus_probe.h
4 * Talks to Xen Store to figure out what devices we have.
6 * Copyright (C) 2005 Rusty Russell, IBM Corporation
7 * Copyright (C) 2005 XenSource Ltd.
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License version 2
11 * as published by the Free Software Foundation; or, when distributed
12 * separately from the Linux kernel or incorporated into other
13 * software packages, subject to the following license:
15 * Permission is hereby granted, free of charge, to any person obtaining a copy
16 * of this source file (the "Software"), to deal in the Software without
17 * restriction, including without limitation the rights to use, copy, modify,
18 * merge, publish, distribute, sublicense, and/or sell copies of the Software,
19 * and to permit persons to whom the Software is furnished to do so, subject to
20 * the following conditions:
22 * The above copyright notice and this permission notice shall be included in
23 * all copies or substantial portions of the Software.
25 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
30 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
31 * IN THE SOFTWARE.
34 #ifndef _XENBUS_PROBE_H
35 #define _XENBUS_PROBE_H
37 #define XEN_BUS_ID_SIZE 20
39 #ifdef CONFIG_XEN_BACKEND
40 extern void xenbus_backend_suspend(int (*fn)(struct device *, void *));
41 extern void xenbus_backend_resume(int (*fn)(struct device *, void *));
42 extern void xenbus_backend_probe_and_watch(void);
43 extern int xenbus_backend_bus_register(void);
44 extern void xenbus_backend_bus_unregister(void);
45 #else
46 static inline void xenbus_backend_suspend(int (*fn)(struct device *, void *)) {}
47 static inline void xenbus_backend_resume(int (*fn)(struct device *, void *)) {}
48 static inline void xenbus_backend_probe_and_watch(void) {}
49 static inline int xenbus_backend_bus_register(void) { return 0; }
50 static inline void xenbus_backend_bus_unregister(void) {}
51 #endif
53 struct xen_bus_type
55 char *root;
56 unsigned int levels;
57 int (*get_bus_id)(char bus_id[XEN_BUS_ID_SIZE], const char *nodename);
58 int (*probe)(const char *type, const char *dir);
59 struct bus_type bus;
62 extern int xenbus_match(struct device *_dev, struct device_driver *_drv);
63 extern int xenbus_dev_probe(struct device *_dev);
64 extern int xenbus_dev_remove(struct device *_dev);
65 extern int xenbus_register_driver_common(struct xenbus_driver *drv,
66 struct xen_bus_type *bus,
67 struct module *owner,
68 const char *mod_name);
69 extern int xenbus_probe_node(struct xen_bus_type *bus,
70 const char *type,
71 const char *nodename);
72 extern int xenbus_probe_devices(struct xen_bus_type *bus);
74 extern void xenbus_dev_changed(const char *node, struct xen_bus_type *bus);
76 #endif