]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: renesas: sh_eth: constify bb_ops
authorRikard Falkeborn <rikard.falkeborn@gmail.com>
Wed, 26 Aug 2020 22:56:05 +0000 (00:56 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Aug 2020 23:21:17 +0000 (16:21 -0700)
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>
drivers/net/ethernet/renesas/sh_eth.c

index f45331ed90b01917ae8f256a8ae14b422e8f8bf8..586642c33d2b423dd9b0eaf7f9ff2ccf30b41900 100644 (file)
@@ -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,