mirror of https://gitee.com/openkylin/linux.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 <rikard.falkeborn@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
715d08712e
commit
3ab4519aec
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue