aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-06-06 08:27:08 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-06-09 05:00:46 -0400
commit33acc6db64f77a7bd773f4bc5cc8fcd1b6976ddc (patch)
tree0ef2de26dfa8da3afba1f4e951c3ccb319282178
parent480104b778876bbf02df972d0bf89266fab82e93 (diff)
sparc: vio: use dev_groups and not dev_attrs for bus_type
The dev_attrs field has long been "depreciated" and is finally being removed, so move the driver to use the "correct" dev_groups field instead for struct bus_type. Acked-by: "David S. Miller" <davem@davemloft.net> Cc: <sparclinux@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--arch/sparc/kernel/vio.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/arch/sparc/kernel/vio.c b/arch/sparc/kernel/vio.c
index f6bb857254fc..78bf2cc60924 100644
--- a/arch/sparc/kernel/vio.c
+++ b/arch/sparc/kernel/vio.c
@@ -105,6 +105,7 @@ static ssize_t devspec_show(struct device *dev,
105 105
106 return sprintf(buf, "%s\n", str); 106 return sprintf(buf, "%s\n", str);
107} 107}
108static DEVICE_ATTR_RO(devspec);
108 109
109static ssize_t type_show(struct device *dev, 110static ssize_t type_show(struct device *dev,
110 struct device_attribute *attr, char *buf) 111 struct device_attribute *attr, char *buf)
@@ -112,6 +113,7 @@ static ssize_t type_show(struct device *dev,
112 struct vio_dev *vdev = to_vio_dev(dev); 113 struct vio_dev *vdev = to_vio_dev(dev);
113 return sprintf(buf, "%s\n", vdev->type); 114 return sprintf(buf, "%s\n", vdev->type);
114} 115}
116static DEVICE_ATTR_RO(type);
115 117
116static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, 118static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
117 char *buf) 119 char *buf)
@@ -120,17 +122,19 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
120 122
121 return sprintf(buf, "vio:T%sS%s\n", vdev->type, vdev->compat); 123 return sprintf(buf, "vio:T%sS%s\n", vdev->type, vdev->compat);
122} 124}
125static DEVICE_ATTR_RO(modalias);
123 126
124static struct device_attribute vio_dev_attrs[] = { 127static struct attribute *vio_dev_attrs[] = {
125 __ATTR_RO(devspec), 128 &dev_attr_devspec.attr,
126 __ATTR_RO(type), 129 &dev_attr_type.attr,
127 __ATTR_RO(modalias), 130 &dev_attr_modalias.attr,
128 __ATTR_NULL 131 NULL,
129}; 132 };
133ATTRIBUTE_GROUPS(vio_dev);
130 134
131static struct bus_type vio_bus_type = { 135static struct bus_type vio_bus_type = {
132 .name = "vio", 136 .name = "vio",
133 .dev_attrs = vio_dev_attrs, 137 .dev_groups = vio_dev_groups,
134 .uevent = vio_hotplug, 138 .uevent = vio_hotplug,
135 .match = vio_bus_match, 139 .match = vio_bus_match,
136 .probe = vio_device_probe, 140 .probe = vio_device_probe,