aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/mscc.c
diff options
context:
space:
mode:
authorQuentin Schulz <quentin.schulz@bootlin.com>2018-09-03 10:48:50 +0200
committerDavid S. Miller <davem@davemloft.net>2018-09-04 10:47:53 -0700
commit36c53cf0f46526b898390659b125155939f67892 (patch)
tree6cc93b07f9b0cd24b9373616d29c59967b674900 /drivers/net/phy/mscc.c
parentnet: phy: mscc: read 'vsc8531,vddmac' as an u32 (diff)
downloadlinux-dev-36c53cf0f46526b898390659b125155939f67892.tar.xz
linux-dev-36c53cf0f46526b898390659b125155939f67892.zip
net: phy: mscc: read 'vsc8531, edge-slowdown' as an u32
In the DT binding, it is specified nowhere that 'vsc8531,edge-slowdown' is an u8, even though it's read as an u8 in the driver. Let's update the driver to take into consideration that the 'vsc8531,edge-slowdown' property is of the default type u32. Signed-off-by: Quentin Schulz <quentin.schulz@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/mscc.c')
-rw-r--r--drivers/net/phy/mscc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/phy/mscc.c b/drivers/net/phy/mscc.c
index 49dc23117732..3c7b02bb5c38 100644
--- a/drivers/net/phy/mscc.c
+++ b/drivers/net/phy/mscc.c
@@ -129,7 +129,7 @@ struct vsc8531_private {
#ifdef CONFIG_OF_MDIO
struct vsc8531_edge_rate_table {
u32 vddmac;
- u8 slowdown[8];
+ u32 slowdown[8];
};
static const struct vsc8531_edge_rate_table edge_table[] = {
@@ -386,8 +386,7 @@ out_unlock:
#ifdef CONFIG_OF_MDIO
static int vsc85xx_edge_rate_magic_get(struct phy_device *phydev)
{
- u8 sd;
- u32 vdd;
+ u32 vdd, sd;
int rc, i, j;
struct device *dev = &phydev->mdio.dev;
struct device_node *of_node = dev->of_node;
@@ -400,7 +399,7 @@ static int vsc85xx_edge_rate_magic_get(struct phy_device *phydev)
if (rc != 0)
vdd = MSCC_VDDMAC_3300;
- rc = of_property_read_u8(of_node, "vsc8531,edge-slowdown", &sd);
+ rc = of_property_read_u32(of_node, "vsc8531,edge-slowdown", &sd);
if (rc != 0)
sd = 0;