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

index 55198ac2b755c0b238fe7445e434c3da400c527b..121b94f09714858a49c04dca090192bf057730f0 100644 (file)
@@ -43,7 +43,7 @@ MODULE_AUTHOR("Larry Finger <Larry.Finger@lwfinger.net>");
 MODULE_DESCRIPTION("RTL8187/RTL8187B USB wireless driver");
 MODULE_LICENSE("GPL");
 
-static struct usb_device_id rtl8187_table[] = {
+static const struct usb_device_id rtl8187_table[] = {
        /* Asus */
        {USB_DEVICE(0x0b05, 0x171d), .driver_info = DEVICE_RTL8187},
        /* Belkin */