rtl8xxxu: constify usb_device_id
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Wed, 9 Aug 2017 16:30:39 +0000 (22:00 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 10 Aug 2017 08:56:03 +0000 (11:56 +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/realtek/rtl8xxxu/rtl8xxxu_core.c

index 21e5ef021260d63795d01163fe36ac347bc07c16..7806a4d2b1fcd348894f64d5bab829579b7da9e1 100644 (file)
@@ -6190,7 +6190,7 @@ static void rtl8xxxu_disconnect(struct usb_interface *interface)
        ieee80211_free_hw(hw);
 }
 
-static struct usb_device_id dev_table[] = {
+static const struct usb_device_id dev_table[] = {
 {USB_DEVICE_AND_INTERFACE_INFO(USB_VENDOR_ID_REALTEK, 0x8724, 0xff, 0xff, 0xff),
        .driver_info = (unsigned long)&rtl8723au_fops},
 {USB_DEVICE_AND_INTERFACE_INFO(USB_VENDOR_ID_REALTEK, 0x1724, 0xff, 0xff, 0xff),