Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752350AbdHHRXh (ORCPT ); Tue, 8 Aug 2017 13:23:37 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:37485 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752092AbdHHRXf (ORCPT ); Tue, 8 Aug 2017 13:23:35 -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 3/3] staging: rtl8712: constify usb_device_id Date: Tue, 8 Aug 2017 22:53:15 +0530 Message-Id: <1502212995-17482-4-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: 846 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/rtl8712/usb_intf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8712/usb_intf.c b/drivers/staging/rtl8712/usb_intf.c index 897d462..b3e266b 100644 --- a/drivers/staging/rtl8712/usb_intf.c +++ b/drivers/staging/rtl8712/usb_intf.c @@ -47,7 +47,7 @@ static int r871xu_drv_init(struct usb_interface *pusb_intf, static void r871xu_dev_remove(struct usb_interface *pusb_intf); -static struct usb_device_id rtl871x_usb_id_tbl[] = { +static const struct usb_device_id rtl871x_usb_id_tbl[] = { /* RTL8188SU */ /* Realtek */ -- 2.7.4