2017-08-22 08:16:13

by Bhumika Goyal

[permalink] [raw]
Subject: [PATCH] net: ethernet: freescale: fs_enet: make mdiobb_ops const

Make this const as it is only stored in a const field of a
mdiobb_ctrl structure.

Signed-off-by: Bhumika Goyal <[email protected]>
---
drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c b/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c
index 1f015ed..c8e5d88 100644
--- a/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c
+++ b/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c
@@ -100,7 +100,7 @@ static inline void mdc(struct mdiobb_ctrl *ctrl, int what)
in_be32(bitbang->dat);
}

-static struct mdiobb_ops bb_ops = {
+static const struct mdiobb_ops bb_ops = {
.owner = THIS_MODULE,
.set_mdc = mdc,
.set_mdio_dir = mdio_dir,
--
1.9.1


2017-08-22 21:23:38

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] net: ethernet: freescale: fs_enet: make mdiobb_ops const

From: Bhumika Goyal <[email protected]>
Date: Tue, 22 Aug 2017 13:45:59 +0530

> Make this const as it is only stored in a const field of a
> mdiobb_ctrl structure.
>
> Signed-off-by: Bhumika Goyal <[email protected]>

Applied.