rtlwifi: constify rate_control_ops structure
authorBhumika Goyal <bhumirks@gmail.com>
Mon, 7 Aug 2017 05:00:51 +0000 (10:30 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 8 Aug 2017 11:53:08 +0000 (14:53 +0300)
rate_control_ops structure is only passed as an argument to the
function ieee80211_rate_control_{register/unregister}. This argument
is of type const, so declare the structure as const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtlwifi/rc.c

index 951d257cd4c01721cf266f99aa71f661f5f5aa24..02811eda57cdc818d165554a3ba00398961acebf 100644 (file)
@@ -283,7 +283,7 @@ static void rtl_rate_free_sta(void *rtlpriv,
        kfree(rate_priv);
 }
 
-static struct rate_control_ops rtl_rate_ops = {
+static const struct rate_control_ops rtl_rate_ops = {
        .name = "rtl_rc",
        .alloc = rtl_rate_alloc,
        .free = rtl_rate_free,