From: linux@armlinux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 7/9] net: mvmdio: add xmdio xsmi support
Date: Mon, 12 Jun 2017 11:42:18 +0100 [thread overview]
Message-ID: <20170612104218.GA10223@n2100.armlinux.org.uk> (raw)
In-Reply-To: <20170612104126.GB4902@n2100.armlinux.org.uk>
From: Russell King <rmk+kernel@armlinux.org.uk>
Subject: [PATCH 1/2] 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: Russell King <rmk+kernel@armlinux.org.uk>
---
drivers/net/ethernet/marvell/mvmdio.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c
index c43747f0be0b..d6770217965e 100644
--- a/drivers/net/ethernet/marvell/mvmdio.c
+++ b/drivers/net/ethernet/marvell/mvmdio.c
@@ -23,7 +23,6 @@
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/module.h>
-#include <linux/mutex.h>
#include <linux/of_device.h>
#include <linux/of_mdio.h>
#include <linux/phy.h>
@@ -69,7 +68,6 @@ enum orion_mdio_bus_type {
};
struct orion_mdio_dev {
- struct mutex lock;
void __iomem *regs;
struct clk *clk[3];
/*
@@ -254,8 +252,6 @@ static int orion_mdio_read(struct mii_bus *bus, int mii_id,
if (IS_ERR(ops))
return PTR_ERR(ops);
- mutex_lock(&dev->lock);
-
ret = orion_mdio_wait_ready(ops, bus);
if (ret < 0)
goto out;
@@ -274,7 +270,6 @@ static int orion_mdio_read(struct mii_bus *bus, int mii_id,
ret = ops->read(dev);
out:
- mutex_unlock(&dev->lock);
return ret;
}
@@ -289,8 +284,6 @@ static int orion_mdio_write(struct mii_bus *bus, int mii_id,
if (IS_ERR(ops))
return PTR_ERR(ops);
- mutex_lock(&dev->lock);
-
ret = orion_mdio_wait_ready(ops, bus);
if (ret < 0)
goto out;
@@ -298,7 +291,6 @@ static int orion_mdio_write(struct mii_bus *bus, int mii_id,
ops->write(dev, mii_id, regnum, value);
out:
- mutex_unlock(&dev->lock);
return ret;
}
@@ -382,8 +374,6 @@ static int orion_mdio_probe(struct platform_device *pdev)
dev->bus_type =
(enum orion_mdio_bus_type)of_device_get_match_data(&pdev->dev);
- mutex_init(&dev->lock);
-
if (pdev->dev.of_node)
ret = of_mdiobus_register(bus, pdev->dev.of_node);
else
--
2.7.4
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
next prev parent reply other threads:[~2017-06-12 10:42 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-12 9:57 [PATCH v3 0/9] net: mvmdio: add xMDIO xSMI support Antoine Tenart
2017-06-12 9:57 ` [PATCH v3 1/9] net: mvmdio: reorder headers alphabetically Antoine Tenart
2017-06-12 9:57 ` [PATCH v3 2/9] net: mvmdio: use tabs for defines Antoine Tenart
2017-06-12 9:57 ` [PATCH v3 3/9] net: mvmdio: use GENMASK for masks Antoine Tenart
2017-06-12 9:57 ` [PATCH v3 4/9] net: mvmdio: move the read valid check into its own function Antoine Tenart
2017-06-12 9:57 ` [PATCH v3 5/9] net: mvmdio: introduce an ops structure Antoine Tenart
2017-06-12 9:57 ` [PATCH v3 6/9] net: mvmdio: put the poll intervals in the " Antoine Tenart
2017-06-12 9:57 ` [PATCH v3 7/9] net: mvmdio: add xmdio xsmi support Antoine Tenart
2017-06-12 10:07 ` Russell King - ARM Linux
2017-06-12 10:17 ` Russell King - ARM Linux
2017-06-12 10:41 ` Russell King - ARM Linux
2017-06-12 10:42 ` Russell King - ARM Linux [this message]
2017-06-12 10:42 ` Russell King - ARM Linux
2017-06-12 11:54 ` Antoine Tenart
2017-06-12 9:57 ` [PATCH v3 8/9] dt-bindings: orion-mdio: document the new xmdio compatible Antoine Tenart
2017-06-12 9:57 ` [PATCH v3 9/9] arm64: marvell: dts: add xmdio nodes for 7k/8k Antoine Tenart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170612104218.GA10223@n2100.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox