From: Rikard Falkeborn Date: Wed, 26 Aug 2020 22:56:05 +0000 (+0200) Subject: net: renesas: sh_eth: constify bb_ops X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=b968a44f7b9470c9df0d1fe5290710969108bfbf;p=linux.git net: renesas: sh_eth: constify bb_ops 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c index f45331ed90b01..586642c33d2b4 100644 --- a/drivers/net/ethernet/renesas/sh_eth.c +++ b/drivers/net/ethernet/renesas/sh_eth.c @@ -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,