aboutsummaryrefslogtreecommitdiffstats
path: root/s01.patch
diff options
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-09-04 17:26:39 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-09-04 17:26:39 -0700
commit1d0da63c6781741b6e9cc9558b13918c09445903 (patch)
tree069426fd313f3a6758c1ece7c74e63530796d481 /s01.patch
parentf2a4447ad2255b39ebc3de81bf020ea667fdf983 (diff)
downloadpatches-1d0da63c6781741b6e9cc9558b13918c09445903.tar.gz
more patches added to clean up dev_attrs
Diffstat (limited to 's01.patch')
-rw-r--r--s01.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/s01.patch b/s01.patch
new file mode 100644
index 00000000000000..f7359d9eacde92
--- /dev/null
+++ b/s01.patch
@@ -0,0 +1,49 @@
+---
+ drivers/input/serio/serio.c | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+--- a/drivers/input/serio/serio.c
++++ b/drivers/input/serio/serio.c
+@@ -373,34 +373,34 @@ static ssize_t serio_show_modalias(struc
+ serio->id.type, serio->id.proto, serio->id.id, serio->id.extra);
+ }
+
+-static ssize_t serio_show_id_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 serio *serio = to_serio_port(dev);
+ return sprintf(buf, "%02x\n", serio->id.type);
+ }
+
+-static ssize_t serio_show_id_proto(struct device *dev, struct device_attribute *attr, char *buf)
++static ssize_t proto_show(struct device *dev, struct device_attribute *attr, char *buf)
+ {
+ struct serio *serio = to_serio_port(dev);
+ return sprintf(buf, "%02x\n", serio->id.proto);
+ }
+
+-static ssize_t serio_show_id_id(struct device *dev, struct device_attribute *attr, char *buf)
++static ssize_t id_show(struct device *dev, struct device_attribute *attr, char *buf)
+ {
+ struct serio *serio = to_serio_port(dev);
+ return sprintf(buf, "%02x\n", serio->id.id);
+ }
+
+-static ssize_t serio_show_id_extra(struct device *dev, struct device_attribute *attr, char *buf)
++static ssize_t extra_show(struct device *dev, struct device_attribute *attr, char *buf)
+ {
+ struct serio *serio = to_serio_port(dev);
+ return sprintf(buf, "%02x\n", serio->id.extra);
+ }
+
+-static DEVICE_ATTR(type, S_IRUGO, serio_show_id_type, NULL);
+-static DEVICE_ATTR(proto, S_IRUGO, serio_show_id_proto, NULL);
+-static DEVICE_ATTR(id, S_IRUGO, serio_show_id_id, NULL);
+-static DEVICE_ATTR(extra, S_IRUGO, serio_show_id_extra, NULL);
++static DEVICE_ATTR_RO(type);
++static DEVICE_ATTR_RO(proto);
++static DEVICE_ATTR_RO(id);
++static DEVICE_ATTR_RO(extra);
+
+ static struct attribute *serio_device_id_attrs[] = {
+ &dev_attr_type.attr,