From 515ad4d678128affa7788a685d79664463f3b1e3 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 19 Aug 2013 21:56:46 -0700 Subject: 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 Cc: Jiri Kosina Signed-off-by: Greg Kroah-Hartman --- drivers/hid/hid-roccat-kone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/hid/hid-roccat-kone.c') 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 = { \ .size = sizeof(struct kone_profile), \ .read = kone_sysfs_read_profilex, \ .write = kone_sysfs_write_profilex, \ - .private = &profile_numbers[number], \ + .private = &profile_numbers[number-1], \ }; PROFILE_ATTR(1); PROFILE_ATTR(2); -- cgit v1.2.3-59-g8ed1b