diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-05 23:10:14 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-05 23:10:14 -0700 |
| commit | 9e06a307a040bb17573afb2f48b6a7d26920394f (patch) | |
| tree | 222b8cbd15a432f906f01dcd21de484984a01bc4 /p20.patch | |
| parent | 439aaed86577bc756086c2193f8fa23ae48d6722 (diff) | |
| download | patches-9e06a307a040bb17573afb2f48b6a7d26920394f.tar.gz | |
new dev_attr bus removal patches added
Diffstat (limited to 'p20.patch')
| -rw-r--r-- | p20.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/p20.patch b/p20.patch new file mode 100644 index 00000000000000..f78b06b95aa3fc --- /dev/null +++ b/p20.patch @@ -0,0 +1,50 @@ +--- + arch/parisc/kernel/drivers.c | 23 +++++++++++++---------- + 1 file changed, 13 insertions(+), 10 deletions(-) + +--- a/arch/parisc/kernel/drivers.c ++++ b/arch/parisc/kernel/drivers.c +@@ -587,7 +587,8 @@ static ssize_t name##_show(struct device + { \ + struct parisc_device *padev = to_parisc_device(dev); \ + return sprintf(buf, format_string, padev->field); \ +-} ++} \ ++static DEVICE_ATTR_RO(name); + + #define pa_dev_attr_id(field, format) pa_dev_attr(field, id.field, format) + +@@ -601,22 +602,24 @@ static ssize_t modalias_show(struct devi + { + return make_modalias(dev, buf); + } ++static DEVICE_ATTR_RO(modalias); + +-static struct device_attribute parisc_device_attrs[] = { +- __ATTR_RO(irq), +- __ATTR_RO(hw_type), +- __ATTR_RO(rev), +- __ATTR_RO(hversion), +- __ATTR_RO(sversion), +- __ATTR_RO(modalias), +- __ATTR_NULL, ++static struct attribute *parisc_device_attrs[] = { ++ &dev_attr_irq.attr, ++ &dev_attr_hw_type.attr, ++ &dev_attr_rev.attr, ++ &dev_attr_hversion.attr, ++ &dev_attr_sversion.attr, ++ &dev_attr_modalias.attr, ++ NULL, + }; ++ATTRIBUTE_GROUPS(parisc_device); + + struct bus_type parisc_bus_type = { + .name = "parisc", + .match = parisc_generic_match, + .uevent = parisc_uevent, +- .dev_attrs = parisc_device_attrs, ++ .dev_groups = parisc_device_groups, + .probe = parisc_driver_probe, + .remove = parisc_driver_remove, + }; |
