Skip to content

Commit

Permalink
chelsio: constify cmac_ops structures
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Julia Lawall authored and David S. Miller committed Dec 9, 2015
1 parent 5abe255 commit 264a4ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/chelsio/cxgb/pm3393.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/chelsio/cxgb/vsc7326.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 264a4ac

Please sign in to comment.