brcmfmac: constify brcmf_bus_ops structures
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sat, 14 Nov 2015 16:22:07 +0000 (17:22 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 26 Nov 2015 12:54:40 +0000 (14:54 +0200)
The brcmf_bus_ops structures are never modified, so declare them as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h
drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c

index 230cad788ace44ebe9bff08b3c92562bf0887159..36093f93bfbe1c057b978474058abf7880f52beb 100644 (file)
@@ -137,7 +137,7 @@ struct brcmf_bus {
        bool always_use_fws_queue;
        bool wowl_supported;
 
-       struct brcmf_bus_ops *ops;
+       const struct brcmf_bus_ops *ops;
        struct brcmf_bus_msgbuf *msgbuf;
 };
 
index e08bc6441e6203925826c0b67ed28c78bdf12675..bbf414494ca92f3a5c16b6708de8d60506ab52e2 100644 (file)
@@ -1413,7 +1413,7 @@ static int brcmf_pcie_get_memdump(struct device *dev, void *data, size_t len)
 }
 
 
-static struct brcmf_bus_ops brcmf_pcie_bus_ops = {
+static const struct brcmf_bus_ops brcmf_pcie_bus_ops = {
        .txdata = brcmf_pcie_tx,
        .stop = brcmf_pcie_down,
        .txctl = brcmf_pcie_tx_ctlpkt,
index 7e74ac3ad81519491ac01460cd3b578e6fb3cc80..01f359efe27e191068afc2130e440d143e78437d 100644 (file)
@@ -4025,7 +4025,7 @@ brcmf_sdio_watchdog(unsigned long data)
        }
 }
 
-static struct brcmf_bus_ops brcmf_sdio_bus_ops = {
+static const struct brcmf_bus_ops brcmf_sdio_bus_ops = {
        .stop = brcmf_sdio_bus_stop,
        .preinit = brcmf_sdio_bus_preinit,
        .txdata = brcmf_sdio_bus_txdata,
index fe8b2bca4687854a35aa7c2747cf0d14309c1c2f..978d14c0953294458bb36e4c04fd97056e9e806d 100644 (file)
@@ -1163,7 +1163,7 @@ static void brcmf_usb_wowl_config(struct device *dev, bool enabled)
                device_set_wakeup_enable(devinfo->dev, false);
 }
 
-static struct brcmf_bus_ops brcmf_usb_bus_ops = {
+static const struct brcmf_bus_ops brcmf_usb_bus_ops = {
        .txdata = brcmf_usb_tx,
        .stop = brcmf_usb_down,
        .txctl = brcmf_usb_tx_ctlpkt,