diff options
Diffstat (limited to 'p21.patch')
| -rw-r--r-- | p21.patch | 73 |
1 files changed, 67 insertions, 6 deletions
diff --git a/p21.patch b/p21.patch index 55c4eef9ed6ac9..a4103d1b64e46f 100644 --- a/p21.patch +++ b/p21.patch @@ -1,10 +1,60 @@ --- - arch/sparc/kernel/vio.c | 13 ++++++++----- - 1 file changed, 8 insertions(+), 5 deletions(-) + arch/powerpc/kernel/vio.c | 12 +++++++++++- + arch/sparc/kernel/vio.c | 18 +++++++++++------- + 2 files changed, 22 insertions(+), 8 deletions(-) +--- a/arch/powerpc/kernel/vio.c ++++ b/arch/powerpc/kernel/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 -@@ -97,6 +97,7 @@ static ssize_t devspec_show(struct devic +@@ -105,6 +105,7 @@ static ssize_t devspec_show(struct devic return sprintf(buf, "%s\n", str); } @@ -12,27 +62,38 @@ static ssize_t type_show(struct device *dev, struct device_attribute *attr, char *buf) -@@ -104,16 +105,18 @@ static ssize_t type_show(struct device * +@@ -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, - .remove = vio_device_remove, |
