aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files/drivers/net/phy/swconfig.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/generic/files/drivers/net/phy/swconfig.c')
-rw-r--r--target/linux/generic/files/drivers/net/phy/swconfig.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/swconfig.c b/target/linux/generic/files/drivers/net/phy/swconfig.c
index 78569a9302..e8a684742c 100644
--- a/target/linux/generic/files/drivers/net/phy/swconfig.c
+++ b/target/linux/generic/files/drivers/net/phy/swconfig.c
@@ -36,7 +36,7 @@ MODULE_LICENSE("GPL");
static int swdev_id;
static struct list_head swdevs;
-static DEFINE_SPINLOCK(swdevs_lock);
+static DEFINE_MUTEX(swdevs_lock);
struct swconfig_callback;
struct swconfig_callback {
@@ -296,13 +296,13 @@ static struct nla_policy link_policy[SWITCH_LINK_ATTR_MAX] = {
static inline void
swconfig_lock(void)
{
- spin_lock(&swdevs_lock);
+ mutex_lock(&swdevs_lock);
}
static inline void
swconfig_unlock(void)
{
- spin_unlock(&swdevs_lock);
+ mutex_unlock(&swdevs_lock);
}
static struct switch_dev *