aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ieee802154/fakelb.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2017-03-20 12:03:07 +0800
committerAlex Shi <alex.shi@linaro.org>2017-03-20 12:03:07 +0800
commit1c563c0006661025d7a6c9bc85fc889a4e8a1c06 (patch)
tree93d455583031d0cacebfd436d5b2118a536de5f7 /drivers/net/ieee802154/fakelb.c
parent71205f3b80da389c52cc2611f59e183a77c56f4f (diff)
parent28ec98bc2e4a175b60f45d505e715a33b93dd077 (diff)
Merge tag 'v4.4.55' into linux-linaro-lsk-v4.4lsk-v4.4-17.03
This is the 4.4.55 stable release
Diffstat (limited to 'drivers/net/ieee802154/fakelb.c')
-rw-r--r--drivers/net/ieee802154/fakelb.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/ieee802154/fakelb.c b/drivers/net/ieee802154/fakelb.c
index 860d4aed8274..43617ded3773 100644
--- a/drivers/net/ieee802154/fakelb.c
+++ b/drivers/net/ieee802154/fakelb.c
@@ -30,7 +30,7 @@
static int numlbs = 2;
static LIST_HEAD(fakelb_phys);
-static DEFINE_SPINLOCK(fakelb_phys_lock);
+static DEFINE_MUTEX(fakelb_phys_lock);
static LIST_HEAD(fakelb_ifup_phys);
static DEFINE_RWLOCK(fakelb_ifup_phys_lock);
@@ -180,9 +180,9 @@ static int fakelb_add_one(struct device *dev)
if (err)
goto err_reg;
- spin_lock(&fakelb_phys_lock);
+ mutex_lock(&fakelb_phys_lock);
list_add_tail(&phy->list, &fakelb_phys);
- spin_unlock(&fakelb_phys_lock);
+ mutex_unlock(&fakelb_phys_lock);
return 0;
@@ -214,10 +214,10 @@ static int fakelb_probe(struct platform_device *pdev)
return 0;
err_slave:
- spin_lock(&fakelb_phys_lock);
+ mutex_lock(&fakelb_phys_lock);
list_for_each_entry_safe(phy, tmp, &fakelb_phys, list)
fakelb_del(phy);
- spin_unlock(&fakelb_phys_lock);
+ mutex_unlock(&fakelb_phys_lock);
return err;
}
@@ -225,10 +225,10 @@ static int fakelb_remove(struct platform_device *pdev)
{
struct fakelb_phy *phy, *tmp;
- spin_lock(&fakelb_phys_lock);
+ mutex_lock(&fakelb_phys_lock);
list_for_each_entry_safe(phy, tmp, &fakelb_phys, list)
fakelb_del(phy);
- spin_unlock(&fakelb_phys_lock);
+ mutex_unlock(&fakelb_phys_lock);
return 0;
}