Skip to content

Commit

Permalink
net: renesas: sh_eth: constify bb_ops
Browse files Browse the repository at this point in the history
The only usage of bb_ops is to assign its address to the ops field in
the mdiobb_ctrl struct, which is a const pointer. Make it const to allow
the compiler to put it in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Rikard Falkeborn authored and David S. Miller committed Aug 26, 2020
1 parent 3ab4519 commit b968a44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/renesas/sh_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,7 @@ static void sh_mdc_ctrl(struct mdiobb_ctrl *ctrl, int bit)
}

/* mdio bus control struct */
static struct mdiobb_ops bb_ops = {
static const struct mdiobb_ops bb_ops = {
.owner = THIS_MODULE,
.set_mdc = sh_mdc_ctrl,
.set_mdio_dir = sh_mmd_ctrl,
Expand Down

0 comments on commit b968a44

Please sign in to comment.