From: Rikard Falkeborn Date: Wed, 26 Aug 2020 22:56:04 +0000 (+0200) Subject: net: ethernet: ravb: constify bb_ops X-Git-Tag: v5.10-rc1~107^2~428^2~4 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=3ab4519aecb424df8abb1beca8e27d71ac242ab6;p=tomoyo%2Ftomoyo-test1.git net: ethernet: ravb: 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/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index 99f7aae102ce..adc8c8f3b5fc 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -162,7 +162,7 @@ static int ravb_get_mdio_data(struct mdiobb_ctrl *ctrl) } /* MDIO bus control struct */ -static struct mdiobb_ops bb_ops = { +static const struct mdiobb_ops bb_ops = { .owner = THIS_MODULE, .set_mdc = ravb_set_mdc, .set_mdio_dir = ravb_set_mdio_dir,