chelsio: constify cmac_ops structures
authorJulia Lawall <julia.lawall@lip6.fr>
Tue, 8 Dec 2015 20:42:09 +0000 (21:42 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Dec 2015 04:27:54 +0000 (23:27 -0500)
The cmac_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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb/pm3393.c
drivers/net/ethernet/chelsio/cxgb/vsc7326.c

index ec5e05052d99ea208e8bf27ae28103cf4e73a23d..eb462d7db4276c9931803926a2e00003a20392b8 100644 (file)
@@ -570,7 +570,7 @@ static void pm3393_destroy(struct cmac *cmac)
        kfree(cmac);
 }
 
-static struct cmac_ops pm3393_ops = {
+static const struct cmac_ops pm3393_ops = {
        .destroy                 = pm3393_destroy,
        .reset                   = pm3393_reset,
        .interrupt_enable        = pm3393_interrupt_enable,
index b0cb388f5e123918310c2dc20e453814b1bcd0db..6f30b6f785539c473670b5c78e10008ce1458fec 100644 (file)
@@ -666,7 +666,7 @@ static void mac_destroy(struct cmac *mac)
        kfree(mac);
 }
 
-static struct cmac_ops vsc7326_ops = {
+static const struct cmac_ops vsc7326_ops = {
        .destroy                  = mac_destroy,
        .reset                    = mac_reset,
        .interrupt_handler        = mac_intr_handler,