3eab516ed26f870b4950cc0d9110fa26c4ff4f32
[openwrt/openwrt.git] / target / linux / generic / patches-4.4 / 740-phy-b53-fix-compilation.patch
1 --- a/drivers/net/phy/b53/b53_mdio.c
2 +++ b/drivers/net/phy/b53/b53_mdio.c
3 @@ -277,11 +277,11 @@ static int b53_phy_probe(struct phy_devi
4 int ret;
5
6 /* allow the generic phy driver to take over */
7 - if (phydev->mdio.addr != B53_PSEUDO_PHY && phydev->mdio.addr != 0)
8 + if (phydev->addr != B53_PSEUDO_PHY && phydev->addr != 0)
9 return -ENODEV;
10
11 dev.current_page = 0xff;
12 - dev.priv = phydev->mdio.bus;
13 + dev.priv = phydev->bus;
14 dev.ops = &b53_mdio_ops;
15 dev.pdata = NULL;
16 mutex_init(&dev.reg_mutex);
17 @@ -305,7 +305,7 @@ static int b53_phy_config_init(struct ph
18 struct b53_device *dev;
19 int ret;
20
21 - dev = b53_switch_alloc(&phydev->mdio.dev, &b53_mdio_ops, phydev->mdio.bus);
22 + dev = b53_switch_alloc(&phydev->dev, &b53_mdio_ops, phydev->bus);
23 if (!dev)
24 return -ENOMEM;
25
26 @@ -372,6 +372,9 @@ static struct phy_driver b53_phy_driver_
27 .config_aneg = b53_phy_config_aneg,
28 .config_init = b53_phy_config_init,
29 .read_status = b53_phy_read_status,
30 + .driver = {
31 + .owner = THIS_MODULE,
32 + },
33 };
34
35 /* BCM53125, BCM53128 */
36 @@ -385,6 +388,9 @@ static struct phy_driver b53_phy_driver_
37 .config_aneg = b53_phy_config_aneg,
38 .config_init = b53_phy_config_init,
39 .read_status = b53_phy_read_status,
40 + .driver = {
41 + .owner = THIS_MODULE,
42 + },
43 };
44
45 /* BCM5365 */
46 @@ -398,21 +404,24 @@ static struct phy_driver b53_phy_driver_
47 .config_aneg = b53_phy_config_aneg,
48 .config_init = b53_phy_config_init,
49 .read_status = b53_phy_read_status,
50 + .driver = {
51 + .owner = THIS_MODULE,
52 + },
53 };
54
55 int __init b53_phy_driver_register(void)
56 {
57 int ret;
58
59 - ret = phy_driver_register(&b53_phy_driver_id1, THIS_MODULE);
60 + ret = phy_driver_register(&b53_phy_driver_id1);
61 if (ret)
62 return ret;
63
64 - ret = phy_driver_register(&b53_phy_driver_id2, THIS_MODULE);
65 + ret = phy_driver_register(&b53_phy_driver_id2);
66 if (ret)
67 goto err1;
68
69 - ret = phy_driver_register(&b53_phy_driver_id3, THIS_MODULE);
70 + ret = phy_driver_register(&b53_phy_driver_id3);
71 if (!ret)
72 return 0;
73
74 --- a/drivers/net/phy/b53/b53_phy_fixup.c
75 +++ b/drivers/net/phy/b53/b53_phy_fixup.c
76 @@ -28,10 +28,10 @@
77
78 static int b53_phy_fixup(struct phy_device *dev)
79 {
80 - struct mii_bus *bus = dev->mdio.bus;
81 u32 phy_id;
82 + struct mii_bus *bus = dev->bus;
83
84 - if (dev->mdio.addr != B53_PSEUDO_PHY)
85 + if (dev->addr != B53_PSEUDO_PHY)
86 return 0;
87
88 /* read the first port's id */