summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-roccat-isku.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-25 02:05:11 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-20 08:22:34 +0400
commit46a58c44c173d3cbfa53931fbb7ad069ef59f190 (patch)
treeabccb167ff6c43c04215b7e670513d669afa10b9 /drivers/hid/hid-roccat-isku.c
parenta93d6b0a879718a1a08553935744b0d5c58354c0 (diff)
downloadlinux-46a58c44c173d3cbfa53931fbb7ad069ef59f190.tar.xz
HID: roccat: 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 roccat class code to use the correct field. Cc: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hid/hid-roccat-isku.c')
-rw-r--r--drivers/hid/hid-roccat-isku.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/hid/hid-roccat-isku.c b/drivers/hid/hid-roccat-isku.c
index 8023751d5257..3983dec062d7 100644
--- a/drivers/hid/hid-roccat-isku.c
+++ b/drivers/hid/hid-roccat-isku.c
@@ -109,13 +109,14 @@ static ssize_t isku_sysfs_set_actual_profile(struct device *dev,
return size;
}
+static DEVICE_ATTR(actual_profile, 0660, isku_sysfs_show_actual_profile,
+ isku_sysfs_set_actual_profile);
-static struct device_attribute isku_attributes[] = {
- __ATTR(actual_profile, 0660,
- isku_sysfs_show_actual_profile,
- isku_sysfs_set_actual_profile),
- __ATTR_NULL
+static struct attribute *isku_attrs[] = {
+ &dev_attr_actual_profile.attr,
+ NULL,
};
+ATTRIBUTE_GROUPS(isku);
static ssize_t isku_sysfs_read(struct file *fp, struct kobject *kobj,
char *buf, loff_t off, size_t count,
@@ -427,7 +428,7 @@ static int __init isku_init(void)
isku_class = class_create(THIS_MODULE, "isku");
if (IS_ERR(isku_class))
return PTR_ERR(isku_class);
- isku_class->dev_attrs = isku_attributes;
+ isku_class->dev_groups = isku_groups;
isku_class->dev_bin_attrs = isku_bin_attributes;
retval = hid_register_driver(&isku_driver);