diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-06-06 14:45:51 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-06-06 14:45:51 +0200 |
| commit | 6e287ace225948565fdcbe3c5cc75d3843af79d0 (patch) | |
| tree | c8da80c9a0686704f6abacaf5677087bff5e8370 /p21.patch | |
| parent | 40a2bc5b5c03c7219f40be1f5be51089a156b974 (diff) | |
| download | patches-6e287ace225948565fdcbe3c5cc75d3843af79d0.tar.gz | |
cleaned up the bus_type.dev_attrs patch series
Diffstat (limited to 'p21.patch')
| -rw-r--r-- | p21.patch | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/p21.patch b/p21.patch deleted file mode 100644 index 0219dd6b92ca87..00000000000000 --- a/p21.patch +++ /dev/null @@ -1,99 +0,0 @@ ---- - arch/powerpc/platforms/pseries/vio.c | 12 +++++++++++- - arch/sparc/kernel/vio.c | 18 +++++++++++------- - 2 files changed, 22 insertions(+), 8 deletions(-) - ---- a/arch/powerpc/platforms/pseries/vio.c -+++ b/arch/powerpc/platforms/pseries/vio.c -@@ -1537,6 +1537,7 @@ static ssize_t name_show(struct device * - { - return sprintf(buf, "%s\n", to_vio_dev(dev)->name); - } -+static DEVICE_ATTR_RO(name); - - static ssize_t devspec_show(struct device *dev, - struct device_attribute *attr, char *buf) -@@ -1545,6 +1546,7 @@ static ssize_t devspec_show(struct devic - - return sprintf(buf, "%s\n", of_node_full_name(of_node)); - } -+static DEVICE_ATTR_RO(devspec); - - static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, - char *buf) -@@ -1566,6 +1568,7 @@ static ssize_t modalias_show(struct devi - - return sprintf(buf, "vio:T%sS%s\n", vio_dev->type, cp); - } -+static DEVICE_ATTR_RO(modalias); - - static struct device_attribute vio_dev_attrs[] = { - __ATTR_RO(name), -@@ -1573,6 +1576,13 @@ static struct device_attribute vio_dev_a - __ATTR_RO(modalias), - __ATTR_NULL - }; -+static struct attribute *vio_dev_attrs[] = { -+ &dev_attr_name.attr, -+ &dev_attr_devspec.attr, -+ &dev_attr_modalias.attr, -+ NULL, -+}; -+ATTRIBUTE_GROUPS(vio_dev); - - void vio_unregister_device(struct vio_dev *viodev) - { -@@ -1608,7 +1618,7 @@ static int vio_hotplug(struct device *de - - struct bus_type vio_bus_type = { - .name = "vio", -- .dev_attrs = vio_dev_attrs, -+ .dev_groups = vio_dev_groups, - .uevent = vio_hotplug, - .match = vio_bus_match, - .probe = vio_bus_probe, ---- a/arch/sparc/kernel/vio.c -+++ b/arch/sparc/kernel/vio.c -@@ -105,6 +105,7 @@ static ssize_t devspec_show(struct devic - - return sprintf(buf, "%s\n", str); - } -+static DEVICE_ATTR_RO(devspec); - - static ssize_t type_show(struct device *dev, - struct device_attribute *attr, char *buf) -@@ -112,6 +113,7 @@ static ssize_t type_show(struct device * - struct vio_dev *vdev = to_vio_dev(dev); - return sprintf(buf, "%s\n", vdev->type); - } -+static DEVICE_ATTR_RO(type); - - static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, - char *buf) -@@ -120,17 +122,19 @@ static ssize_t modalias_show(struct devi - - return sprintf(buf, "vio:T%sS%s\n", vdev->type, vdev->compat); - } -+static DEVICE_ATTR_RO(modalias); - --static struct device_attribute vio_dev_attrs[] = { -- __ATTR_RO(devspec), -- __ATTR_RO(type), -- __ATTR_RO(modalias), -- __ATTR_NULL --}; -+static struct attribute *vio_dev_attrs[] = { -+ &dev_attr_devspec.attr, -+ &dev_attr_type.attr, -+ &dev_attr_modalias.attr, -+ NULL, -+ }; -+ATTRIBUTE_GROUPS(vio_dev); - - static struct bus_type vio_bus_type = { - .name = "vio", -- .dev_attrs = vio_dev_attrs, -+ .dev_groups = vio_dev_groups, - .uevent = vio_hotplug, - .match = vio_bus_match, - .probe = vio_device_probe, |
