summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-03-11 16:49:33 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-03-11 16:49:33 +0000
commitdad19ac8b2034e31b1926f1a25a680f6ff8ba52d (patch)
tree3e4b95ca5af43bb458e2345a476143b861b6246f /target
parent6c51c47962b8ed9c06350bf256ecacc072bebdca (diff)
downloadmtk-20170518-dad19ac8b2034e31b1926f1a25a680f6ff8ba52d.zip
mtk-20170518-dad19ac8b2034e31b1926f1a25a680f6ff8ba52d.tar.gz
mtk-20170518-dad19ac8b2034e31b1926f1a25a680f6ff8ba52d.tar.bz2
generic: ar8216: add lockep assertion to ar8216_rmw
SVN-Revision: 30883
Diffstat (limited to 'target')
-rw-r--r--target/linux/generic/files/drivers/net/phy/ar8216.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c
index 1521ea3..c199ac1 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -29,6 +29,7 @@
#include <linux/phy.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
+#include <linux/lockdep.h>
#include "ar8216.h"
/* size of the vlan table */
@@ -122,6 +123,8 @@ ar8216_rmw(struct ar8216_priv *priv, int reg, u32 mask, u32 val)
{
u32 v;
+ lockdep_assert_held(&priv->reg_mutex);
+
v = priv->read(priv, reg);
v &= ~mask;
v |= val;