diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-20 00:56:46 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-20 00:56:46 -0400 |
commit | 515ad4d678128affa7788a685d79664463f3b1e3 (patch) | |
tree | 7ee09925cc25e6a69372aa35c275bfab649ef643 /drivers | |
parent | 975b53cc903033b7ac30a37e06452394d6734018 (diff) |
hid: roccat-kone: fix off-by-one bug in attributes
Stefan pointed out that I messed up the array for the binary attributes,
so fix it properly.
Reported-by: Stefan Achatz <erazor_de@users.sourceforge.net>
Cc: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hid/hid-roccat-kone.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-roccat-kone.c b/drivers/hid/hid-roccat-kone.c index 5eddf834c05c..6e614a85f175 100644 --- a/drivers/hid/hid-roccat-kone.c +++ b/drivers/hid/hid-roccat-kone.c | |||
@@ -386,7 +386,7 @@ static struct bin_attribute bin_attr_profile##number = { \ | |||
386 | .size = sizeof(struct kone_profile), \ | 386 | .size = sizeof(struct kone_profile), \ |
387 | .read = kone_sysfs_read_profilex, \ | 387 | .read = kone_sysfs_read_profilex, \ |
388 | .write = kone_sysfs_write_profilex, \ | 388 | .write = kone_sysfs_write_profilex, \ |
389 | .private = &profile_numbers[number], \ | 389 | .private = &profile_numbers[number-1], \ |
390 | }; | 390 | }; |
391 | PROFILE_ATTR(1); | 391 | PROFILE_ATTR(1); |
392 | PROFILE_ATTR(2); | 392 | PROFILE_ATTR(2); |