aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen/xenbus/xenbus_probe.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/xen/xenbus/xenbus_probe.c')
-rw-r--r--drivers/xen/xenbus/xenbus_probe.c24
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}
387static DEVICE_ATTR_RO(nodename);
387 388
388static ssize_t devtype_show(struct device *dev, 389static 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}
394static DEVICE_ATTR_RO(devtype);
393 395
394static ssize_t modalias_show(struct device *dev, 396static 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}
402static DEVICE_ATTR_RO(modalias);
400 403
401struct device_attribute xenbus_dev_attrs[] = { 404static 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};
407EXPORT_SYMBOL_GPL(xenbus_dev_attrs); 410
411static const struct attribute_group xenbus_dev_group = {
412 .attrs = xenbus_dev_attrs,
413};
414
415const struct attribute_group *xenbus_dev_groups[] = {
416 &xenbus_dev_group,
417 NULL,
418};
419EXPORT_SYMBOL_GPL(xenbus_dev_groups);
408 420
409int xenbus_probe_node(struct xen_bus_type *bus, 421int xenbus_probe_node(struct xen_bus_type *bus,
410 const char *type, 422 const char *type,