Commit 0caf0305 authored by Russell King's avatar Russell King Committed by David S. Miller

net: mvmdio: remove duplicate locking

The MDIO layer already provides per-bus locking, so there's no need for
MDIO bus drivers to do their own internal locking.  Remove this.
Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fd3ebd85
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/mutex.h>
#include <linux/of_mdio.h> #include <linux/of_mdio.h>
#include <linux/phy.h> #include <linux/phy.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
...@@ -51,7 +50,6 @@ ...@@ -51,7 +50,6 @@
#define MVMDIO_SMI_POLL_INTERVAL_MAX 55 #define MVMDIO_SMI_POLL_INTERVAL_MAX 55
struct orion_mdio_dev { struct orion_mdio_dev {
struct mutex lock;
void __iomem *regs; void __iomem *regs;
struct clk *clk[3]; struct clk *clk[3];
/* /*
...@@ -116,8 +114,6 @@ static int orion_mdio_read(struct mii_bus *bus, int mii_id, ...@@ -116,8 +114,6 @@ static int orion_mdio_read(struct mii_bus *bus, int mii_id,
u32 val; u32 val;
int ret; int ret;
mutex_lock(&dev->lock);
ret = orion_mdio_wait_ready(bus); ret = orion_mdio_wait_ready(bus);
if (ret < 0) if (ret < 0)
goto out; goto out;
...@@ -140,7 +136,6 @@ static int orion_mdio_read(struct mii_bus *bus, int mii_id, ...@@ -140,7 +136,6 @@ static int orion_mdio_read(struct mii_bus *bus, int mii_id,
ret = val & GENMASK(15, 0); ret = val & GENMASK(15, 0);
out: out:
mutex_unlock(&dev->lock);
return ret; return ret;
} }
...@@ -150,8 +145,6 @@ static int orion_mdio_write(struct mii_bus *bus, int mii_id, ...@@ -150,8 +145,6 @@ static int orion_mdio_write(struct mii_bus *bus, int mii_id,
struct orion_mdio_dev *dev = bus->priv; struct orion_mdio_dev *dev = bus->priv;
int ret; int ret;
mutex_lock(&dev->lock);
ret = orion_mdio_wait_ready(bus); ret = orion_mdio_wait_ready(bus);
if (ret < 0) if (ret < 0)
goto out; goto out;
...@@ -163,7 +156,6 @@ static int orion_mdio_write(struct mii_bus *bus, int mii_id, ...@@ -163,7 +156,6 @@ static int orion_mdio_write(struct mii_bus *bus, int mii_id,
dev->regs); dev->regs);
out: out:
mutex_unlock(&dev->lock);
return ret; return ret;
} }
...@@ -244,8 +236,6 @@ static int orion_mdio_probe(struct platform_device *pdev) ...@@ -244,8 +236,6 @@ static int orion_mdio_probe(struct platform_device *pdev)
return -EPROBE_DEFER; return -EPROBE_DEFER;
} }
mutex_init(&dev->lock);
if (pdev->dev.of_node) if (pdev->dev.of_node)
ret = of_mdiobus_register(bus, pdev->dev.of_node); ret = of_mdiobus_register(bus, pdev->dev.of_node);
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment