aboutsummaryrefslogtreecommitdiffstats
path: root/cuse-convert-class-code-to-use-dev_groups.patch
diff options
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-09 15:43:27 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-09 15:43:27 -0700
commit94ed31a17e12bd77b8a5982c6bf9623b9a623fe7 (patch)
tree3468dad21566837ef07c8d4d6fe434fcaadd876a /cuse-convert-class-code-to-use-dev_groups.patch
parentaaf275f945460b5cb5ee6ea9ef95b06db5334461 (diff)
downloadpatches-94ed31a17e12bd77b8a5982c6bf9623b9a623fe7.tar.gz
renamed patches and broke them up
Diffstat (limited to 'cuse-convert-class-code-to-use-dev_groups.patch')
-rw-r--r--cuse-convert-class-code-to-use-dev_groups.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/cuse-convert-class-code-to-use-dev_groups.patch b/cuse-convert-class-code-to-use-dev_groups.patch
new file mode 100644
index 00000000000000..b11e4401de6b64
--- /dev/null
+++ b/cuse-convert-class-code-to-use-dev_groups.patch
@@ -0,0 +1,54 @@
+From foo@baz Tue Jul 9 15:33:17 PDT 2013
+Date: Tue, 09 Jul 2013 15:33:17 -0700
+To: Greg KH <gregkh@linuxfoundation.org>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: cuse: convert class code to use dev_groups
+
+The dev_attrs field of struct class is going away soon, dev_groups
+should be used instead. This converts the cuse class code to use the
+correct field.
+
+Cc: Miklos Szeredi <miklos@szeredi.hu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/fuse/cuse.c | 13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+--- a/fs/fuse/cuse.c
++++ b/fs/fuse/cuse.c
+@@ -568,6 +568,7 @@ static ssize_t cuse_class_waiting_show(s
+
+ return sprintf(buf, "%d\n", atomic_read(&cc->fc.num_waiting));
+ }
++static DEVICE_ATTR(waiting, S_IFREG | 0400, cuse_class_waiting_show, NULL);
+
+ static ssize_t cuse_class_abort_store(struct device *dev,
+ struct device_attribute *attr,
+@@ -578,12 +579,14 @@ static ssize_t cuse_class_abort_store(st
+ fuse_abort_conn(&cc->fc);
+ return count;
+ }
++static DEVICE_ATTR(abort, S_IFREG | 0200, NULL, cuse_class_abort_store);
+
+-static struct device_attribute cuse_class_dev_attrs[] = {
+- __ATTR(waiting, S_IFREG | 0400, cuse_class_waiting_show, NULL),
+- __ATTR(abort, S_IFREG | 0200, NULL, cuse_class_abort_store),
+- { }
++static struct attribute *cuse_class_dev_attrs[] = {
++ &dev_attr_waiting.attr,
++ &dev_attr_abort.attr,
++ NULL,
+ };
++ATTRIBUTE_GROUPS(cuse_class_dev);
+
+ static struct miscdevice cuse_miscdev = {
+ .minor = MISC_DYNAMIC_MINOR,
+@@ -609,7 +612,7 @@ static int __init cuse_init(void)
+ if (IS_ERR(cuse_class))
+ return PTR_ERR(cuse_class);
+
+- cuse_class->dev_attrs = cuse_class_dev_attrs;
++ cuse_class->dev_groups = cuse_class_dev_groups;
+
+ rc = misc_register(&cuse_miscdev);
+ if (rc) {