ath9k: make ath_ps_ops structures as const
authorBhumika Goyal <bhumirks@gmail.com>
Thu, 3 Aug 2017 14:55:31 +0000 (20:25 +0530)
committerKalle Valo <kvalo@qca.qualcomm.com>
Tue, 8 Aug 2017 11:09:15 +0000 (14:09 +0300)
ath_ps_ops structures are only stored as a reference in the ps_ops
field of a ath_common structure. This field is of type const, so make
the structures as const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath9k/htc_drv_init.c
drivers/net/wireless/ath/ath9k/init.c

index defacc6c9c995ea6b2b755a1ac11978d805006eb..da2164b0cccc3890c100786c334d6c3cc3923ec8 100644 (file)
@@ -71,7 +71,7 @@ static void ath9k_htc_op_ps_restore(struct ath_common *common)
        ath9k_htc_ps_restore((struct ath9k_htc_priv *) common->priv);
 }
 
-static struct ath_ps_ops ath9k_htc_ps_ops = {
+static const struct ath_ps_ops ath9k_htc_ps_ops = {
        .wakeup = ath9k_htc_op_ps_wakeup,
        .restore = ath9k_htc_op_ps_restore,
 };
index fd9a61834c17f8ac8f3612f3c89de13a78de5189..bb7936090b915ae39e90a066dbf9e144d7e46758 100644 (file)
@@ -104,7 +104,7 @@ static void ath9k_op_ps_restore(struct ath_common *common)
        ath9k_ps_restore((struct ath_softc *) common->priv);
 }
 
-static struct ath_ps_ops ath9k_ps_ops = {
+static const struct ath_ps_ops ath9k_ps_ops = {
        .wakeup = ath9k_op_ps_wakeup,
        .restore = ath9k_op_ps_restore,
 };