ath9k: constify usb_device_id
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Wed, 9 Aug 2017 16:24:11 +0000 (21:54 +0530)
committerKalle Valo <kvalo@qca.qualcomm.com>
Fri, 11 Aug 2017 13:59:07 +0000 (16:59 +0300)
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath9k/hif_usb.c

index 0d9687a2aa98ac159a5864630ebfde9c243bd6c9..c5f4dd808745a639556d8b0f10bc0af50ddbdaff 100644 (file)
@@ -20,7 +20,7 @@
 MODULE_FIRMWARE(HTC_7010_MODULE_FW);
 MODULE_FIRMWARE(HTC_9271_MODULE_FW);
 
-static struct usb_device_id ath9k_hif_usb_ids[] = {
+static const struct usb_device_id ath9k_hif_usb_ids[] = {
        { USB_DEVICE(0x0cf3, 0x9271) }, /* Atheros */
        { USB_DEVICE(0x0cf3, 0x1006) }, /* Atheros */
        { USB_DEVICE(0x0846, 0x9030) }, /* Netgear N150 */