Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752437AbdHHRXz (ORCPT ); Tue, 8 Aug 2017 13:23:55 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:34194 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752253AbdHHRXc (ORCPT ); Tue, 8 Aug 2017 13:23:32 -0400 From: Arvind Yadav To: gregkh@linuxfoundation.org, luca@lucaceresoli.net, florian.c.schilhabel@googlemail.com Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org Subject: [PATCH 2/3] staging: rtl8188eu: constify usb_device_id Date: Tue, 8 Aug 2017 22:53:14 +0530 Message-Id: <1502212995-17482-3-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1502212995-17482-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1502212995-17482-1-git-send-email-arvind.yadav.cs@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 943 Lines: 24 usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c index 963235f..2ef71c3 100644 --- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c +++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c @@ -32,7 +32,7 @@ #define USB_VENDER_ID_REALTEK 0x0bda /* DID_USB_v916_20130116 */ -static struct usb_device_id rtw_usb_id_tbl[] = { +static const struct usb_device_id rtw_usb_id_tbl[] = { /*=== Realtek demoboard ===*/ {USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8179)}, /* 8188EUS */ {USB_DEVICE(USB_VENDER_ID_REALTEK, 0x0179)}, /* 8188ETV */ -- 2.7.4