Skip to content

Commit 7cb6e01

Browse files
goyalbhumikadavem330
authored andcommitted
drivers/net/sungem: add const to mii_phy_ops structures
The object references of mii_phy_ops structures are only stored in the ops field of a mii_phy_def structure. This ops field is of type const. So, mii_phy_ops structures having similar properties can be declared as const. Signed-off-by: Bhumika Goyal <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 3948b57 commit 7cb6e01

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

drivers/net/sungem_phy.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ static int marvell_read_link(struct mii_phy *phy)
886886
SUPPORTED_1000baseT_Half | SUPPORTED_1000baseT_Full)
887887

888888
/* Broadcom BCM 5201 */
889-
static struct mii_phy_ops bcm5201_phy_ops = {
889+
static const struct mii_phy_ops bcm5201_phy_ops = {
890890
.init = bcm5201_init,
891891
.suspend = bcm5201_suspend,
892892
.setup_aneg = genmii_setup_aneg,
@@ -905,7 +905,7 @@ static struct mii_phy_def bcm5201_phy_def = {
905905
};
906906

907907
/* Broadcom BCM 5221 */
908-
static struct mii_phy_ops bcm5221_phy_ops = {
908+
static const struct mii_phy_ops bcm5221_phy_ops = {
909909
.suspend = bcm5221_suspend,
910910
.init = bcm5221_init,
911911
.setup_aneg = genmii_setup_aneg,
@@ -924,7 +924,7 @@ static struct mii_phy_def bcm5221_phy_def = {
924924
};
925925

926926
/* Broadcom BCM 5241 */
927-
static struct mii_phy_ops bcm5241_phy_ops = {
927+
static const struct mii_phy_ops bcm5241_phy_ops = {
928928
.suspend = bcm5241_suspend,
929929
.init = bcm5241_init,
930930
.setup_aneg = genmii_setup_aneg,
@@ -942,7 +942,7 @@ static struct mii_phy_def bcm5241_phy_def = {
942942
};
943943

944944
/* Broadcom BCM 5400 */
945-
static struct mii_phy_ops bcm5400_phy_ops = {
945+
static const struct mii_phy_ops bcm5400_phy_ops = {
946946
.init = bcm5400_init,
947947
.suspend = bcm5400_suspend,
948948
.setup_aneg = bcm54xx_setup_aneg,
@@ -961,7 +961,7 @@ static struct mii_phy_def bcm5400_phy_def = {
961961
};
962962

963963
/* Broadcom BCM 5401 */
964-
static struct mii_phy_ops bcm5401_phy_ops = {
964+
static const struct mii_phy_ops bcm5401_phy_ops = {
965965
.init = bcm5401_init,
966966
.suspend = bcm5401_suspend,
967967
.setup_aneg = bcm54xx_setup_aneg,
@@ -980,7 +980,7 @@ static struct mii_phy_def bcm5401_phy_def = {
980980
};
981981

982982
/* Broadcom BCM 5411 */
983-
static struct mii_phy_ops bcm5411_phy_ops = {
983+
static const struct mii_phy_ops bcm5411_phy_ops = {
984984
.init = bcm5411_init,
985985
.suspend = generic_suspend,
986986
.setup_aneg = bcm54xx_setup_aneg,
@@ -999,7 +999,7 @@ static struct mii_phy_def bcm5411_phy_def = {
999999
};
10001000

10011001
/* Broadcom BCM 5421 */
1002-
static struct mii_phy_ops bcm5421_phy_ops = {
1002+
static const struct mii_phy_ops bcm5421_phy_ops = {
10031003
.init = bcm5421_init,
10041004
.suspend = generic_suspend,
10051005
.setup_aneg = bcm54xx_setup_aneg,
@@ -1019,7 +1019,7 @@ static struct mii_phy_def bcm5421_phy_def = {
10191019
};
10201020

10211021
/* Broadcom BCM 5421 built-in K2 */
1022-
static struct mii_phy_ops bcm5421k2_phy_ops = {
1022+
static const struct mii_phy_ops bcm5421k2_phy_ops = {
10231023
.init = bcm5421_init,
10241024
.suspend = generic_suspend,
10251025
.setup_aneg = bcm54xx_setup_aneg,
@@ -1037,7 +1037,7 @@ static struct mii_phy_def bcm5421k2_phy_def = {
10371037
.ops = &bcm5421k2_phy_ops
10381038
};
10391039

1040-
static struct mii_phy_ops bcm5461_phy_ops = {
1040+
static const struct mii_phy_ops bcm5461_phy_ops = {
10411041
.init = bcm5421_init,
10421042
.suspend = generic_suspend,
10431043
.setup_aneg = bcm54xx_setup_aneg,
@@ -1057,7 +1057,7 @@ static struct mii_phy_def bcm5461_phy_def = {
10571057
};
10581058

10591059
/* Broadcom BCM 5462 built-in Vesta */
1060-
static struct mii_phy_ops bcm5462V_phy_ops = {
1060+
static const struct mii_phy_ops bcm5462V_phy_ops = {
10611061
.init = bcm5421_init,
10621062
.suspend = generic_suspend,
10631063
.setup_aneg = bcm54xx_setup_aneg,
@@ -1076,15 +1076,15 @@ static struct mii_phy_def bcm5462V_phy_def = {
10761076
};
10771077

10781078
/* Marvell 88E1101 amd 88E1111 */
1079-
static struct mii_phy_ops marvell88e1101_phy_ops = {
1079+
static const struct mii_phy_ops marvell88e1101_phy_ops = {
10801080
.suspend = generic_suspend,
10811081
.setup_aneg = marvell_setup_aneg,
10821082
.setup_forced = marvell_setup_forced,
10831083
.poll_link = genmii_poll_link,
10841084
.read_link = marvell_read_link
10851085
};
10861086

1087-
static struct mii_phy_ops marvell88e1111_phy_ops = {
1087+
static const struct mii_phy_ops marvell88e1111_phy_ops = {
10881088
.init = marvell88e1111_init,
10891089
.suspend = generic_suspend,
10901090
.setup_aneg = marvell_setup_aneg,
@@ -1122,7 +1122,7 @@ static struct mii_phy_def marvell88e1111_phy_def = {
11221122
};
11231123

11241124
/* Generic implementation for most 10/100 PHYs */
1125-
static struct mii_phy_ops generic_phy_ops = {
1125+
static const struct mii_phy_ops generic_phy_ops = {
11261126
.setup_aneg = genmii_setup_aneg,
11271127
.setup_forced = genmii_setup_forced,
11281128
.poll_link = genmii_poll_link,

0 commit comments

Comments
 (0)