generic: ar8216: add lockep assertion to ar8216_rmw
authorGabor Juhos <juhosg@openwrt.org>
Sun, 11 Mar 2012 16:49:33 +0000 (16:49 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Sun, 11 Mar 2012 16:49:33 +0000 (16:49 +0000)
SVN-Revision: 30883

target/linux/generic/files/drivers/net/phy/ar8216.c

index 1521ea317a0bc727c5a488b60904bafa3771997d..c199ac178ce84f94c5d2696a42712f52aede21b9 100644 (file)
@@ -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;