aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files/drivers/net
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2017-02-06 11:28:54 +0100
committerRafał Miłecki <rafal@milecki.pl>2017-02-06 11:28:54 +0100
commitb008357960dd39f9e5f4c14841ba4407951c47b1 (patch)
treeb16d54c11442ddca0db61cfb0bac065173bf661c /target/linux/generic/files/drivers/net
parent26bc05eda96ad65dba0d42e7e2bb98222978d822 (diff)
downloadupstream-b008357960dd39f9e5f4c14841ba4407951c47b1.tar.gz
upstream-b008357960dd39f9e5f4c14841ba4407951c47b1.tar.bz2
upstream-b008357960dd39f9e5f4c14841ba4407951c47b1.zip
kernel: port b53 to use kernel 4.5+ API
For backward 4.4 compatibility I added patch reverting my changes. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/generic/files/drivers/net')
-rw-r--r--target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c21
-rw-r--r--target/linux/generic/files/drivers/net/phy/b53/b53_phy_fixup.c4
2 files changed, 8 insertions, 17 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c b/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c
index 185c95ffa7..75bb4d941c 100644
--- a/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c
+++ b/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c
@@ -277,11 +277,11 @@ static int b53_phy_probe(struct phy_device *phydev)
int ret;
/* allow the generic phy driver to take over */
- if (phydev->addr != B53_PSEUDO_PHY && phydev->addr != 0)
+ if (phydev->mdio.addr != B53_PSEUDO_PHY && phydev->mdio.addr != 0)
return -ENODEV;
dev.current_page = 0xff;
- dev.priv = phydev->bus;
+ dev.priv = phydev->mdio.bus;
dev.ops = &b53_mdio_ops;
dev.pdata = NULL;
mutex_init(&dev.reg_mutex);
@@ -305,7 +305,7 @@ static int b53_phy_config_init(struct phy_device *phydev)
struct b53_device *dev;
int ret;
- dev = b53_switch_alloc(&phydev->dev, &b53_mdio_ops, phydev->bus);
+ dev = b53_switch_alloc(&phydev->mdio.dev, &b53_mdio_ops, phydev->mdio.bus);
if (!dev)
return -ENOMEM;
@@ -372,9 +372,6 @@ static struct phy_driver b53_phy_driver_id1 = {
.config_aneg = b53_phy_config_aneg,
.config_init = b53_phy_config_init,
.read_status = b53_phy_read_status,
- .driver = {
- .owner = THIS_MODULE,
- },
};
/* BCM53125, BCM53128 */
@@ -388,9 +385,6 @@ static struct phy_driver b53_phy_driver_id2 = {
.config_aneg = b53_phy_config_aneg,
.config_init = b53_phy_config_init,
.read_status = b53_phy_read_status,
- .driver = {
- .owner = THIS_MODULE,
- },
};
/* BCM5365 */
@@ -404,24 +398,21 @@ static struct phy_driver b53_phy_driver_id3 = {
.config_aneg = b53_phy_config_aneg,
.config_init = b53_phy_config_init,
.read_status = b53_phy_read_status,
- .driver = {
- .owner = THIS_MODULE,
- },
};
int __init b53_phy_driver_register(void)
{
int ret;
- ret = phy_driver_register(&b53_phy_driver_id1);
+ ret = phy_driver_register(&b53_phy_driver_id1, THIS_MODULE);
if (ret)
return ret;
- ret = phy_driver_register(&b53_phy_driver_id2);
+ ret = phy_driver_register(&b53_phy_driver_id2, THIS_MODULE);
if (ret)
goto err1;
- ret = phy_driver_register(&b53_phy_driver_id3);
+ ret = phy_driver_register(&b53_phy_driver_id3, THIS_MODULE);
if (!ret)
return 0;
diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_phy_fixup.c b/target/linux/generic/files/drivers/net/phy/b53/b53_phy_fixup.c
index 72d1373d7f..e2f8a39ab6 100644
--- a/target/linux/generic/files/drivers/net/phy/b53/b53_phy_fixup.c
+++ b/target/linux/generic/files/drivers/net/phy/b53/b53_phy_fixup.c
@@ -28,10 +28,10 @@
static int b53_phy_fixup(struct phy_device *dev)
{
+ struct mii_bus *bus = dev->mdio.bus;
u32 phy_id;
- struct mii_bus *bus = dev->bus;
- if (dev->addr != B53_PSEUDO_PHY)
+ if (dev->mdio.addr != B53_PSEUDO_PHY)
return 0;
/* read the first port's id */