diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2018-07-13 10:13:44 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2018-07-17 09:33:47 -0400 |
commit | cf6d15d7b1f386905616912b2d450c8d7092a0f0 (patch) | |
tree | f88aee8eaa6e1ab8f039ea341148d0282bee2970 | |
parent | b875a5a529bedf73532000f4e2496c00a00f4765 (diff) |
HID: multitouch: make sure the static list of class is not changed
const is a magic keyword here :)
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r-- | drivers/hid/hid-multitouch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index 45968f7970f8..91624a2240ca 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c | |||
@@ -211,7 +211,7 @@ static int cypress_compute_slot(struct mt_device *td) | |||
211 | return -1; | 211 | return -1; |
212 | } | 212 | } |
213 | 213 | ||
214 | static struct mt_class mt_classes[] = { | 214 | static const struct mt_class mt_classes[] = { |
215 | { .name = MT_CLS_DEFAULT, | 215 | { .name = MT_CLS_DEFAULT, |
216 | .quirks = MT_QUIRK_ALWAYS_VALID | | 216 | .quirks = MT_QUIRK_ALWAYS_VALID | |
217 | MT_QUIRK_CONTACT_CNT_ACCURATE }, | 217 | MT_QUIRK_CONTACT_CNT_ACCURATE }, |
@@ -1432,7 +1432,7 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id) | |||
1432 | { | 1432 | { |
1433 | int ret, i; | 1433 | int ret, i; |
1434 | struct mt_device *td; | 1434 | struct mt_device *td; |
1435 | struct mt_class *mtclass = mt_classes; /* MT_CLS_DEFAULT */ | 1435 | const struct mt_class *mtclass = mt_classes; /* MT_CLS_DEFAULT */ |
1436 | 1436 | ||
1437 | for (i = 0; mt_classes[i].name ; i++) { | 1437 | for (i = 0; mt_classes[i].name ; i++) { |
1438 | if (id->driver_data == mt_classes[i].name) { | 1438 | if (id->driver_data == mt_classes[i].name) { |