Skip to content
This repository has been archived by the owner on Sep 24, 2020. It is now read-only.

Commit

Permalink
driver core: devcoredump: convert to use class_groups
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
gregkh committed Nov 29, 2016
1 parent ced6473 commit f76d252
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions drivers/base/devcoredump.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f76d252

Please sign in to comment.