Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751384AbdI3Q0t (ORCPT ); Sat, 30 Sep 2017 12:26:49 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:34403 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751028AbdI3Q0s (ORCPT ); Sat, 30 Sep 2017 12:26:48 -0400 X-Google-Smtp-Source: AOwi7QCLHDMeVAQ8r7BpLlyz06i/sOQEZ6xejDJ+jt1u3xfi/0ogAbJqZFzGjxG2OD0FtqyFjWUYZA== From: Bhumika Goyal To: julia.lawall@lip6.fr, gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH] staging: rtl8192u: make r8192_wx_handlers_def structure const Date: Sat, 30 Sep 2017 21:56:35 +0530 Message-Id: <1506788795-7698-1-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1458 Lines: 39 Make this const as it is only stored in a const field of a pci_dev structure. Make the declaration in the header const too. Structure found using Coccinelle and changes done by hand. Signed-off-by: Bhumika Goyal --- drivers/staging/rtl8192u/r8192U_wx.c | 2 +- drivers/staging/rtl8192u/r8192U_wx.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_wx.c b/drivers/staging/rtl8192u/r8192U_wx.c index a954538..e4e6c97 100644 --- a/drivers/staging/rtl8192u/r8192U_wx.c +++ b/drivers/staging/rtl8192u/r8192U_wx.c @@ -964,7 +964,7 @@ struct iw_statistics *r8192_get_wireless_stats(struct net_device *dev) return wstats; } -struct iw_handler_def r8192_wx_handlers_def = { +const struct iw_handler_def r8192_wx_handlers_def = { .standard = r8192_wx_handlers, .num_standard = ARRAY_SIZE(r8192_wx_handlers), .private = r8192_private_handler, diff --git a/drivers/staging/rtl8192u/r8192U_wx.h b/drivers/staging/rtl8192u/r8192U_wx.h index fb5f808..a6c2b95 100644 --- a/drivers/staging/rtl8192u/r8192U_wx.h +++ b/drivers/staging/rtl8192u/r8192U_wx.h @@ -17,7 +17,7 @@ #ifndef R8180_WX_H #define R8180_WX_H -extern struct iw_handler_def r8192_wx_handlers_def; +extern const struct iw_handler_def r8192_wx_handlers_def; /* Enable the rtl819x_core.c to share this function, david 2008.9.22 */ struct iw_statistics *r8192_get_wireless_stats(struct net_device *dev); -- 1.9.1