Skip to content

Commit d193d53

Browse files
goyalbhumikadavem330
authored andcommitted
drivers: net: emac: 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 7cb6e01 commit d193d53

File tree

1 file changed

+6
-6
lines changed
  • drivers/net/ethernet/ibm/emac

1 file changed

+6
-6
lines changed

drivers/net/ethernet/ibm/emac/phy.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ static int genmii_read_link(struct mii_phy *phy)
276276
}
277277

278278
/* Generic implementation for most 10/100/1000 PHYs */
279-
static struct mii_phy_ops generic_phy_ops = {
279+
static const struct mii_phy_ops generic_phy_ops = {
280280
.setup_aneg = genmii_setup_aneg,
281281
.setup_forced = genmii_setup_forced,
282282
.poll_link = genmii_poll_link,
@@ -340,7 +340,7 @@ static int cis8201_init(struct mii_phy *phy)
340340
return 0;
341341
}
342342

343-
static struct mii_phy_ops cis8201_phy_ops = {
343+
static const struct mii_phy_ops cis8201_phy_ops = {
344344
.init = cis8201_init,
345345
.setup_aneg = genmii_setup_aneg,
346346
.setup_forced = genmii_setup_forced,
@@ -420,7 +420,7 @@ static int et1011c_init(struct mii_phy *phy)
420420
return 0;
421421
}
422422

423-
static struct mii_phy_ops et1011c_phy_ops = {
423+
static const struct mii_phy_ops et1011c_phy_ops = {
424424
.init = et1011c_init,
425425
.setup_aneg = genmii_setup_aneg,
426426
.setup_forced = genmii_setup_forced,
@@ -439,7 +439,7 @@ static struct mii_phy_def et1011c_phy_def = {
439439

440440

441441

442-
static struct mii_phy_ops m88e1111_phy_ops = {
442+
static const struct mii_phy_ops m88e1111_phy_ops = {
443443
.init = m88e1111_init,
444444
.setup_aneg = genmii_setup_aneg,
445445
.setup_forced = genmii_setup_forced,
@@ -455,7 +455,7 @@ static struct mii_phy_def m88e1111_phy_def = {
455455
.ops = &m88e1111_phy_ops,
456456
};
457457

458-
static struct mii_phy_ops m88e1112_phy_ops = {
458+
static const struct mii_phy_ops m88e1112_phy_ops = {
459459
.init = m88e1112_init,
460460
.setup_aneg = genmii_setup_aneg,
461461
.setup_forced = genmii_setup_forced,
@@ -480,7 +480,7 @@ static int ar8035_init(struct mii_phy *phy)
480480
return 0;
481481
}
482482

483-
static struct mii_phy_ops ar8035_phy_ops = {
483+
static const struct mii_phy_ops ar8035_phy_ops = {
484484
.init = ar8035_init,
485485
.setup_aneg = genmii_setup_aneg,
486486
.setup_forced = genmii_setup_forced,

0 commit comments

Comments
 (0)