diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-24 18:05:24 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-26 21:05:18 -0400 |
commit | 4183fb9503e117ef6d7564a4dbdf0582c5d638ad (patch) | |
tree | af31de1bab3a9b9b62e29cc1b7a68d143f288de7 /fs/fuse | |
parent | 3499116b915e260b275c167a471e0e05bbe3f1d6 (diff) |
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.
Acked-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/fuse')
-rw-r--r-- | fs/fuse/cuse.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/fuse/cuse.c b/fs/fuse/cuse.c index aef34b1e635e..adbfd66b380f 100644 --- a/fs/fuse/cuse.c +++ b/fs/fuse/cuse.c | |||
@@ -568,6 +568,7 @@ static ssize_t cuse_class_waiting_show(struct device *dev, | |||
568 | 568 | ||
569 | return sprintf(buf, "%d\n", atomic_read(&cc->fc.num_waiting)); | 569 | return sprintf(buf, "%d\n", atomic_read(&cc->fc.num_waiting)); |
570 | } | 570 | } |
571 | static DEVICE_ATTR(waiting, S_IFREG | 0400, cuse_class_waiting_show, NULL); | ||
571 | 572 | ||
572 | static ssize_t cuse_class_abort_store(struct device *dev, | 573 | static ssize_t cuse_class_abort_store(struct device *dev, |
573 | struct device_attribute *attr, | 574 | struct device_attribute *attr, |
@@ -578,12 +579,14 @@ static ssize_t cuse_class_abort_store(struct device *dev, | |||
578 | fuse_abort_conn(&cc->fc); | 579 | fuse_abort_conn(&cc->fc); |
579 | return count; | 580 | return count; |
580 | } | 581 | } |
582 | static DEVICE_ATTR(abort, S_IFREG | 0200, NULL, cuse_class_abort_store); | ||
581 | 583 | ||
582 | static struct device_attribute cuse_class_dev_attrs[] = { | 584 | static struct attribute *cuse_class_dev_attrs[] = { |
583 | __ATTR(waiting, S_IFREG | 0400, cuse_class_waiting_show, NULL), | 585 | &dev_attr_waiting.attr, |
584 | __ATTR(abort, S_IFREG | 0200, NULL, cuse_class_abort_store), | 586 | &dev_attr_abort.attr, |
585 | { } | 587 | NULL, |
586 | }; | 588 | }; |
589 | ATTRIBUTE_GROUPS(cuse_class_dev); | ||
587 | 590 | ||
588 | static struct miscdevice cuse_miscdev = { | 591 | static struct miscdevice cuse_miscdev = { |
589 | .minor = MISC_DYNAMIC_MINOR, | 592 | .minor = MISC_DYNAMIC_MINOR, |
@@ -609,7 +612,7 @@ static int __init cuse_init(void) | |||
609 | if (IS_ERR(cuse_class)) | 612 | if (IS_ERR(cuse_class)) |
610 | return PTR_ERR(cuse_class); | 613 | return PTR_ERR(cuse_class); |
611 | 614 | ||
612 | cuse_class->dev_attrs = cuse_class_dev_attrs; | 615 | cuse_class->dev_groups = cuse_class_dev_groups; |
613 | 616 | ||
614 | rc = misc_register(&cuse_miscdev); | 617 | rc = misc_register(&cuse_miscdev); |
615 | if (rc) { | 618 | if (rc) { |