diff options
Diffstat (limited to 'drivers/xen/xenbus/xenbus_probe.c')
-rw-r--r-- | drivers/xen/xenbus/xenbus_probe.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c index 38e92b770e91..3c0a74b3e9b1 100644 --- a/drivers/xen/xenbus/xenbus_probe.c +++ b/drivers/xen/xenbus/xenbus_probe.c | |||
@@ -384,12 +384,14 @@ static ssize_t nodename_show(struct device *dev, | |||
384 | { | 384 | { |
385 | return sprintf(buf, "%s\n", to_xenbus_device(dev)->nodename); | 385 | return sprintf(buf, "%s\n", to_xenbus_device(dev)->nodename); |
386 | } | 386 | } |
387 | static DEVICE_ATTR_RO(nodename); | ||
387 | 388 | ||
388 | static ssize_t devtype_show(struct device *dev, | 389 | static ssize_t devtype_show(struct device *dev, |
389 | struct device_attribute *attr, char *buf) | 390 | struct device_attribute *attr, char *buf) |
390 | { | 391 | { |
391 | return sprintf(buf, "%s\n", to_xenbus_device(dev)->devicetype); | 392 | return sprintf(buf, "%s\n", to_xenbus_device(dev)->devicetype); |
392 | } | 393 | } |
394 | static DEVICE_ATTR_RO(devtype); | ||
393 | 395 | ||
394 | static ssize_t modalias_show(struct device *dev, | 396 | static ssize_t modalias_show(struct device *dev, |
395 | struct device_attribute *attr, char *buf) | 397 | struct device_attribute *attr, char *buf) |
@@ -397,14 +399,24 @@ static ssize_t modalias_show(struct device *dev, | |||
397 | return sprintf(buf, "%s:%s\n", dev->bus->name, | 399 | return sprintf(buf, "%s:%s\n", dev->bus->name, |
398 | to_xenbus_device(dev)->devicetype); | 400 | to_xenbus_device(dev)->devicetype); |
399 | } | 401 | } |
402 | static DEVICE_ATTR_RO(modalias); | ||
400 | 403 | ||
401 | struct device_attribute xenbus_dev_attrs[] = { | 404 | static struct attribute *xenbus_dev_attrs[] = { |
402 | __ATTR_RO(nodename), | 405 | &dev_attr_nodename.attr, |
403 | __ATTR_RO(devtype), | 406 | &dev_attr_devtype.attr, |
404 | __ATTR_RO(modalias), | 407 | &dev_attr_modalias.attr, |
405 | __ATTR_NULL | 408 | NULL, |
406 | }; | 409 | }; |
407 | EXPORT_SYMBOL_GPL(xenbus_dev_attrs); | 410 | |
411 | static const struct attribute_group xenbus_dev_group = { | ||
412 | .attrs = xenbus_dev_attrs, | ||
413 | }; | ||
414 | |||
415 | const struct attribute_group *xenbus_dev_groups[] = { | ||
416 | &xenbus_dev_group, | ||
417 | NULL, | ||
418 | }; | ||
419 | EXPORT_SYMBOL_GPL(xenbus_dev_groups); | ||
408 | 420 | ||
409 | int xenbus_probe_node(struct xen_bus_type *bus, | 421 | int xenbus_probe_node(struct xen_bus_type *bus, |
410 | const char *type, | 422 | const char *type, |