diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-11-28 18:41:58 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-11-29 23:12:12 +0300 |
commit | f76d25275c314defb684fdd692239507001774bc (patch) | |
tree | fcb5fb57a76e4ea93a6f22fa5ee3f149454d302b | |
parent | ced6473e7486702f530a49f886b73195e4977734 (diff) | |
download | linux-f76d25275c314defb684fdd692239507001774bc.tar.xz |
driver core: devcoredump: convert to use class_groups
Convert devcoredump to use class_groups instead of class_attrs as that's
the correct way to handle lists of class attribute files.
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/base/devcoredump.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/base/devcoredump.c b/drivers/base/devcoredump.c index 240374fd1838..7be310f7db73 100644 --- a/drivers/base/devcoredump.c +++ b/drivers/base/devcoredump.c @@ -160,18 +160,20 @@ static ssize_t disabled_store(struct class *class, struct class_attribute *attr, return count; } +static CLASS_ATTR_RW(disabled); -static struct class_attribute devcd_class_attrs[] = { - __ATTR_RW(disabled), - __ATTR_NULL +static struct attribute *devcd_class_attrs[] = { + &class_attr_disabled.attr, + NULL, }; +ATTRIBUTE_GROUPS(devcd_class); static struct class devcd_class = { .name = "devcoredump", .owner = THIS_MODULE, .dev_release = devcd_dev_release, .dev_groups = devcd_dev_groups, - .class_attrs = devcd_class_attrs, + .class_groups = devcd_class_groups, }; static ssize_t devcd_readv(char *buffer, loff_t offset, size_t count, |