Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1707472 > unrolled thread

[PATCH v2 17/20] rtl8xxxu: constify usb_device_id

Started byArvind Yadav <arvind.yadav.cs@gmail.com>
First post2017-08-09 18:40 +0200
Last post2017-08-09 18:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH v2 17/20] rtl8xxxu: constify usb_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-09 18:40 +0200

#1707472 — [PATCH v2 17/20] rtl8xxxu: constify usb_device_id

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-09 18:40 +0200
Subject[PATCH v2 17/20] rtl8xxxu: constify usb_device_id
Message-ID<ucCbw-1mZ-7@gated-at.bofh.it>
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>
---
changes in v2:
              Re-submitting wireless separately.

 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
index 21e5ef0..7806a4d 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
@@ -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),
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web