brcm80211: constify usb_device_id
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Fri, 11 Aug 2017 05:23:50 +0000 (10:53 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 11 Aug 2017 13:53:41 +0000 (16:53 +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@codeaurora.org>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c

index 8f20a4bb40d91d7c3611a9d195996403b9c03813..11ffaa01599eb4b343b7f675dc275fc8572d127e 100644 (file)
@@ -1468,7 +1468,7 @@ static int brcmf_usb_reset_resume(struct usb_interface *intf)
 #define CYPRESS_USB_DEVICE(dev_id)     \
        { USB_DEVICE(CY_USB_VENDOR_ID_CYPRESS, dev_id) }
 
-static struct usb_device_id brcmf_usb_devid_table[] = {
+static const struct usb_device_id brcmf_usb_devid_table[] = {
        BRCMF_USB_DEVICE(BRCM_USB_43143_DEVICE_ID),
        BRCMF_USB_DEVICE(BRCM_USB_43236_DEVICE_ID),
        BRCMF_USB_DEVICE(BRCM_USB_43242_DEVICE_ID),