aboutsummaryrefslogtreecommitdiffstats
path: root/p17.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 /p17.patch
parent439aaed86577bc756086c2193f8fa23ae48d6722 (diff)
downloadpatches-9e06a307a040bb17573afb2f48b6a7d26920394f.tar.gz
new dev_attr bus removal patches added
Diffstat (limited to 'p17.patch')
-rw-r--r--p17.patch97
1 files changed, 97 insertions, 0 deletions
diff --git a/p17.patch b/p17.patch
new file mode 100644
index 00000000000000..579db636b78bec
--- /dev/null
+++ b/p17.patch
@@ -0,0 +1,97 @@
+---
+ drivers/message/i2o/core.h | 2 +-
+ drivers/message/i2o/device.c | 32 +++++++++++++++++++++-----------
+ drivers/message/i2o/driver.c | 2 +-
+ 3 files changed, 23 insertions(+), 13 deletions(-)
+
+--- a/drivers/message/i2o/core.h
++++ b/drivers/message/i2o/core.h
+@@ -33,7 +33,7 @@ extern int __init i2o_pci_init(void);
+ extern void __exit i2o_pci_exit(void);
+
+ /* device */
+-extern struct device_attribute i2o_device_attrs[];
++extern const struct attribute_group *i2o_device_groups[];
+
+ extern void i2o_device_remove(struct i2o_device *);
+ extern int i2o_device_parse_lct(struct i2o_controller *);
+--- a/drivers/message/i2o/device.c
++++ b/drivers/message/i2o/device.c
+@@ -138,45 +138,55 @@ static void i2o_device_release(struct de
+ }
+
+ /**
+- * i2o_device_show_class_id - Displays class id of I2O device
++ * class_id_show - Displays class id of I2O device
+ * @dev: device of which the class id should be displayed
+ * @attr: pointer to device attribute
+ * @buf: buffer into which the class id should be printed
+ *
+ * Returns the number of bytes which are printed into the buffer.
+ */
+-static ssize_t i2o_device_show_class_id(struct device *dev,
+- struct device_attribute *attr,
+- char *buf)
++static ssize_t class_id_show(struct device *dev, struct device_attribute *attr,
++ char *buf)
+ {
+ struct i2o_device *i2o_dev = to_i2o_device(dev);
+
+ sprintf(buf, "0x%03x\n", i2o_dev->lct_data.class_id);
+ return strlen(buf) + 1;
+ }
++static DEVICE_ATTR_RO(class_id);
+
+ /**
+- * i2o_device_show_tid - Displays TID of I2O device
++ * tid_show - Displays TID of I2O device
+ * @dev: device of which the TID should be displayed
+ * @attr: pointer to device attribute
+ * @buf: buffer into which the TID should be printed
+ *
+ * Returns the number of bytes which are printed into the buffer.
+ */
+-static ssize_t i2o_device_show_tid(struct device *dev,
+- struct device_attribute *attr, char *buf)
++static ssize_t tid_show(struct device *dev, struct device_attribute *attr,
++ char *buf)
+ {
+ struct i2o_device *i2o_dev = to_i2o_device(dev);
+
+ sprintf(buf, "0x%03x\n", i2o_dev->lct_data.tid);
+ return strlen(buf) + 1;
+ }
++static DEVICE_ATTR_RO(tid);
+
+ /* I2O device attributes */
+-struct device_attribute i2o_device_attrs[] = {
+- __ATTR(class_id, S_IRUGO, i2o_device_show_class_id, NULL),
+- __ATTR(tid, S_IRUGO, i2o_device_show_tid, NULL),
+- __ATTR_NULL
++static struct attribute *i2o_device_attrs[] = {
++ &dev_attr_class_id.attr,
++ &dev_attr_tid.attr,
++ NULL,
++};
++
++static const struct attribute_group i2o_device_group = {
++ .attrs = i2o_device_attrs,
++};
++
++const struct attribute_group *i2o_device_groups[] = {
++ &i2o_device_group,
++ NULL,
+ };
+
+ /**
+--- a/drivers/message/i2o/driver.c
++++ b/drivers/message/i2o/driver.c
+@@ -62,7 +62,7 @@ static int i2o_bus_match(struct device *
+ struct bus_type i2o_bus_type = {
+ .name = "i2o",
+ .match = i2o_bus_match,
+- .dev_attrs = i2o_device_attrs
++ .dev_groups = i2o_device_groups,
+ };
+
+ /**