summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRikard Falkeborn <rikard.falkeborn@gmail.com>2020-08-27 00:56:07 +0200
committerDavid S. Miller <davem@davemloft.net>2020-08-26 16:21:17 -0700
commit73a9df4c10292ff4b5a937cac38313568acb05dc (patch)
treecf3e0851bb71f977c0a00e359b41ed29b1a962dd /drivers
parent3faaf53920dbb5bc3177f208ccbc75580a7ed8a0 (diff)
net: phy: mscc: macsec: constify vsc8584_macsec_ops
The only usage of vsc8584_macsec_ops is to assign its address to the macsec_ops field in the phydev 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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/phy/mscc/mscc_macsec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/phy/mscc/mscc_macsec.c b/drivers/net/phy/mscc/mscc_macsec.c
index 1d4c012194e9..6cf9b798b710 100644
--- a/drivers/net/phy/mscc/mscc_macsec.c
+++ b/drivers/net/phy/mscc/mscc_macsec.c
@@ -958,7 +958,7 @@ static int vsc8584_macsec_del_txsa(struct macsec_context *ctx)
return 0;
}
-static struct macsec_ops vsc8584_macsec_ops = {
+static const struct macsec_ops vsc8584_macsec_ops = {
.mdo_dev_open = vsc8584_macsec_dev_open,
.mdo_dev_stop = vsc8584_macsec_dev_stop,
.mdo_add_secy = vsc8584_macsec_add_secy,