From: Benjamin Tissoires Date: Fri, 13 Jul 2018 14:13:44 +0000 (+0200) Subject: HID: multitouch: make sure the static list of class is not changed X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=cf6d15d7b1f386905616912b2d450c8d7092a0f0;p=openwrt%2Fstaging%2Fblogic.git HID: multitouch: make sure the static list of class is not changed const is a magic keyword here :) Acked-by: Peter Hutterer Signed-off-by: Benjamin Tissoires Signed-off-by: Jiri Kosina --- 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) return -1; } -static struct mt_class mt_classes[] = { +static const struct mt_class mt_classes[] = { { .name = MT_CLS_DEFAULT, .quirks = MT_QUIRK_ALWAYS_VALID | MT_QUIRK_CONTACT_CNT_ACCURATE }, @@ -1432,7 +1432,7 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id) { int ret, i; struct mt_device *td; - struct mt_class *mtclass = mt_classes; /* MT_CLS_DEFAULT */ + const struct mt_class *mtclass = mt_classes; /* MT_CLS_DEFAULT */ for (i = 0; mt_classes[i].name ; i++) { if (id->driver_data == mt_classes[i].name) {