Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1531400
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/3] driver core: devcoredump: convert to use class_groups |
| Date | 2016-11-28 16:50 +0100 |
| Message-ID | <sIwlP-3V2-1@gated-at.bofh.it> (permalink) |
| References | <sIwlP-3V2-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Convert devcoredump to use class_groups instead of class_attrs as that's
the correct way to handle lists of class attribute files.
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/base/devcoredump.c | 10 ++++++----
1 file 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,
--
2.10.2
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 2/3] driver core: devcoredump: convert to use class_groups Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-28 16:50 +0100
Re: [PATCH 2/3] driver core: devcoredump: convert to use class_groups Johannes Berg <johannes@sipsolutions.net> - 2016-11-28 16:50 +0100
[PATCH 3/3] driver core: firmware_class: convert to use class_groups Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-28 16:50 +0100
Re: [PATCH 3/3] driver core: firmware_class: convert to use class_groups "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-11-29 19:10 +0100
csiph-web