aboutsummaryrefslogtreecommitdiffstats
path: root/p18.patch
diff options
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-05 23:10:14 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-05 23:10:14 -0700
commit9e06a307a040bb17573afb2f48b6a7d26920394f (patch)
tree222b8cbd15a432f906f01dcd21de484984a01bc4 /p18.patch
parent439aaed86577bc756086c2193f8fa23ae48d6722 (diff)
downloadpatches-9e06a307a040bb17573afb2f48b6a7d26920394f.tar.gz
new dev_attr bus removal patches added
Diffstat (limited to 'p18.patch')
-rw-r--r--p18.patch92
1 files changed, 92 insertions, 0 deletions
diff --git a/p18.patch b/p18.patch
new file mode 100644
index 00000000000000..3bcaa2231a6b63
--- /dev/null
+++ b/p18.patch
@@ -0,0 +1,92 @@
+---
+ arch/arm/mach-rpc/ecard.c | 38 ++++++++++++++++++++++----------------
+ 1 file changed, 22 insertions(+), 16 deletions(-)
+
+--- a/arch/arm/mach-rpc/ecard.c
++++ b/arch/arm/mach-rpc/ecard.c
+@@ -761,19 +761,21 @@ static struct expansion_card *__init eca
+ return ec;
+ }
+
+-static ssize_t ecard_show_irq(struct device *dev, struct device_attribute *attr, char *buf)
++static ssize_t irq_show(struct device *dev, struct device_attribute *attr, char *buf)
+ {
+ struct expansion_card *ec = ECARD_DEV(dev);
+ return sprintf(buf, "%u\n", ec->irq);
+ }
++static DEVICE_ATTR_RO(irq);
+
+-static ssize_t ecard_show_dma(struct device *dev, struct device_attribute *attr, char *buf)
++static ssize_t dma_show(struct device *dev, struct device_attribute *attr, char *buf)
+ {
+ struct expansion_card *ec = ECARD_DEV(dev);
+ return sprintf(buf, "%u\n", ec->dma);
+ }
++static DEVICE_ATTR_RO(dma);
+
+-static ssize_t ecard_show_resources(struct device *dev, struct device_attribute *attr, char *buf)
++static ssize_t resource_show(struct device *dev, struct device_attribute *attr, char *buf)
+ {
+ struct expansion_card *ec = ECARD_DEV(dev);
+ char *str = buf;
+@@ -787,35 +789,39 @@ static ssize_t ecard_show_resources(stru
+
+ return str - buf;
+ }
++static DEVICE_ATTR_RO(resource_show)
+
+-static ssize_t ecard_show_vendor(struct device *dev, struct device_attribute *attr, char *buf)
++static ssize_t vendor_show(struct device *dev, struct device_attribute *attr, char *buf)
+ {
+ struct expansion_card *ec = ECARD_DEV(dev);
+ return sprintf(buf, "%u\n", ec->cid.manufacturer);
+ }
++static DEVICE_ATTR_RO(vendor);
+
+-static ssize_t ecard_show_device(struct device *dev, struct device_attribute *attr, char *buf)
++static ssize_t device_show(struct device *dev, struct device_attribute *attr, char *buf)
+ {
+ struct expansion_card *ec = ECARD_DEV(dev);
+ return sprintf(buf, "%u\n", ec->cid.product);
+ }
++static DEVICE_ATTR_RO(device);
+
+-static ssize_t ecard_show_type(struct device *dev, struct device_attribute *attr, char *buf)
++static ssize_t type_show(struct device *dev, struct device_attribute *attr, char *buf)
+ {
+ struct expansion_card *ec = ECARD_DEV(dev);
+ return sprintf(buf, "%s\n", ec->easi ? "EASI" : "IOC");
+ }
++static DEVICE_ATTR_RO(type);
+
+-static struct device_attribute ecard_dev_attrs[] = {
+- __ATTR(device, S_IRUGO, ecard_show_device, NULL),
+- __ATTR(dma, S_IRUGO, ecard_show_dma, NULL),
+- __ATTR(irq, S_IRUGO, ecard_show_irq, NULL),
+- __ATTR(resource, S_IRUGO, ecard_show_resources, NULL),
+- __ATTR(type, S_IRUGO, ecard_show_type, NULL),
+- __ATTR(vendor, S_IRUGO, ecard_show_vendor, NULL),
+- __ATTR_NULL,
++static struct attribute *ecard_dev_attrs[] = {
++ &dev_attr_device.attr,
++ &dev_attr_dma.attr,
++ &dev_attr_irq.attr,
++ &dev_attr_resource.attr,
++ &dev_attr_type.attr,
++ &dev_attr_vendor.attr,
++ NULL,
+ };
+-
++ATTRIBUTE_GROUPS(ecard_dev);
+
+ int ecard_request_resources(struct expansion_card *ec)
+ {
+@@ -1120,7 +1126,7 @@ static int ecard_match(struct device *_d
+
+ struct bus_type ecard_bus_type = {
+ .name = "ecard",
+- .dev_attrs = ecard_dev_attrs,
++ .dev_groups = ecard_dev_groups,
+ .match = ecard_match,
+ .probe = ecard_drv_probe,
+ .remove = ecard_drv_remove,