diff options
Diffstat (limited to 'drivers/xen/xenbus/xenbus_probe_backend.c')
-rw-r--r-- | drivers/xen/xenbus/xenbus_probe_backend.c | 41 |
1 files changed, 12 insertions, 29 deletions
diff --git a/drivers/xen/xenbus/xenbus_probe_backend.c b/drivers/xen/xenbus/xenbus_probe_backend.c index 9b9dd36bb1c4..6cf467bf63ec 100644 --- a/drivers/xen/xenbus/xenbus_probe_backend.c +++ b/drivers/xen/xenbus/xenbus_probe_backend.c | |||
@@ -84,8 +84,8 @@ static int backend_bus_id(char bus_id[XEN_BUS_ID_SIZE], const char *nodename) | |||
84 | if (err) | 84 | if (err) |
85 | return err; | 85 | return err; |
86 | 86 | ||
87 | if (snprintf(bus_id, XEN_BUS_ID_SIZE, | 87 | if (snprintf(bus_id, XEN_BUS_ID_SIZE, "%.*s-%i-%s", |
88 | "%.*s-%i-%s", typelen, type, domid, devid) >= XEN_BUS_ID_SIZE) | 88 | typelen, type, domid, devid) >= XEN_BUS_ID_SIZE) |
89 | return -ENOSPC; | 89 | return -ENOSPC; |
90 | return 0; | 90 | return 0; |
91 | } | 91 | } |
@@ -147,7 +147,8 @@ static int xenbus_probe_backend_unit(struct xen_bus_type *bus, | |||
147 | } | 147 | } |
148 | 148 | ||
149 | /* backend/<typename>/<frontend-domid> */ | 149 | /* backend/<typename>/<frontend-domid> */ |
150 | static int xenbus_probe_backend(struct xen_bus_type *bus, const char *type, const char *domid) | 150 | static int xenbus_probe_backend(struct xen_bus_type *bus, const char *type, |
151 | const char *domid) | ||
151 | { | 152 | { |
152 | char *nodename; | 153 | char *nodename; |
153 | int err = 0; | 154 | int err = 0; |
@@ -188,18 +189,18 @@ static struct device_attribute xenbus_backend_dev_attrs[] = { | |||
188 | 189 | ||
189 | static struct xen_bus_type xenbus_backend = { | 190 | static struct xen_bus_type xenbus_backend = { |
190 | .root = "backend", | 191 | .root = "backend", |
191 | .levels = 3, /* backend/type/<frontend>/<id> */ | 192 | .levels = 3, /* backend/type/<frontend>/<id> */ |
192 | .get_bus_id = backend_bus_id, | 193 | .get_bus_id = backend_bus_id, |
193 | .probe = xenbus_probe_backend, | 194 | .probe = xenbus_probe_backend, |
194 | .otherend_changed = frontend_changed, | 195 | .otherend_changed = frontend_changed, |
195 | .bus = { | 196 | .bus = { |
196 | .name = "xen-backend", | 197 | .name = "xen-backend", |
197 | .match = xenbus_match, | 198 | .match = xenbus_match, |
198 | .uevent = xenbus_uevent_backend, | 199 | .uevent = xenbus_uevent_backend, |
199 | .probe = xenbus_dev_probe, | 200 | .probe = xenbus_dev_probe, |
200 | .remove = xenbus_dev_remove, | 201 | .remove = xenbus_dev_remove, |
201 | .shutdown = xenbus_dev_shutdown, | 202 | .shutdown = xenbus_dev_shutdown, |
202 | .dev_attrs = xenbus_backend_dev_attrs, | 203 | .dev_attrs = xenbus_backend_dev_attrs, |
203 | }, | 204 | }, |
204 | }; | 205 | }; |
205 | 206 | ||
@@ -221,24 +222,6 @@ static int read_frontend_details(struct xenbus_device *xendev) | |||
221 | return xenbus_read_otherend_details(xendev, "frontend-id", "frontend"); | 222 | return xenbus_read_otherend_details(xendev, "frontend-id", "frontend"); |
222 | } | 223 | } |
223 | 224 | ||
224 | //void xenbus_backend_suspend(int (*fn)(struct device *, void *)) | ||
225 | //{ | ||
226 | // DPRINTK(""); | ||
227 | // bus_for_each_dev(&xenbus_backend.bus, NULL, NULL, fn); | ||
228 | //} | ||
229 | |||
230 | //void xenbus_backend_resume(int (*fn)(struct device *, void *)) | ||
231 | //{ | ||
232 | // DPRINTK(""); | ||
233 | // bus_for_each_dev(&xenbus_backend.bus, NULL, NULL, fn); | ||
234 | //} | ||
235 | |||
236 | //int xenbus_for_each_backend(void *arg, int (*fn)(struct device *, void *)) | ||
237 | //{ | ||
238 | // return bus_for_each_dev(&xenbus_backend.bus, NULL, arg, fn); | ||
239 | //} | ||
240 | //EXPORT_SYMBOL_GPL(xenbus_for_each_backend); | ||
241 | |||
242 | int xenbus_dev_is_online(struct xenbus_device *dev) | 225 | int xenbus_dev_is_online(struct xenbus_device *dev) |
243 | { | 226 | { |
244 | int rc, val; | 227 | int rc, val; |