Commit 10a485c5 authored by Denis CIOCCA's avatar Denis CIOCCA Committed by Jonathan Cameron

iio:trigger: fix sysfs name on list mutex

Signed-off-by: default avatarDenis Ciocca <denis.ciocca@st.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 85528e88
...@@ -23,7 +23,7 @@ struct iio_sysfs_trig { ...@@ -23,7 +23,7 @@ struct iio_sysfs_trig {
}; };
static LIST_HEAD(iio_sysfs_trig_list); static LIST_HEAD(iio_sysfs_trig_list);
static DEFINE_MUTEX(iio_syfs_trig_list_mut); static DEFINE_MUTEX(iio_sysfs_trig_list_mut);
static int iio_sysfs_trigger_probe(int id); static int iio_sysfs_trigger_probe(int id);
static ssize_t iio_sysfs_trig_add(struct device *dev, static ssize_t iio_sysfs_trig_add(struct device *dev,
...@@ -135,7 +135,7 @@ static int iio_sysfs_trigger_probe(int id) ...@@ -135,7 +135,7 @@ static int iio_sysfs_trigger_probe(int id)
struct iio_sysfs_trig *t; struct iio_sysfs_trig *t;
int ret; int ret;
bool foundit = false; bool foundit = false;
mutex_lock(&iio_syfs_trig_list_mut); mutex_lock(&iio_sysfs_trig_list_mut);
list_for_each_entry(t, &iio_sysfs_trig_list, l) list_for_each_entry(t, &iio_sysfs_trig_list, l)
if (id == t->id) { if (id == t->id) {
foundit = true; foundit = true;
...@@ -169,7 +169,7 @@ static int iio_sysfs_trigger_probe(int id) ...@@ -169,7 +169,7 @@ static int iio_sysfs_trigger_probe(int id)
goto out2; goto out2;
list_add(&t->l, &iio_sysfs_trig_list); list_add(&t->l, &iio_sysfs_trig_list);
__module_get(THIS_MODULE); __module_get(THIS_MODULE);
mutex_unlock(&iio_syfs_trig_list_mut); mutex_unlock(&iio_sysfs_trig_list_mut);
return 0; return 0;
out2: out2:
...@@ -177,7 +177,7 @@ static int iio_sysfs_trigger_probe(int id) ...@@ -177,7 +177,7 @@ static int iio_sysfs_trigger_probe(int id)
free_t: free_t:
kfree(t); kfree(t);
out1: out1:
mutex_unlock(&iio_syfs_trig_list_mut); mutex_unlock(&iio_sysfs_trig_list_mut);
return ret; return ret;
} }
...@@ -185,14 +185,14 @@ static int iio_sysfs_trigger_remove(int id) ...@@ -185,14 +185,14 @@ static int iio_sysfs_trigger_remove(int id)
{ {
bool foundit = false; bool foundit = false;
struct iio_sysfs_trig *t; struct iio_sysfs_trig *t;
mutex_lock(&iio_syfs_trig_list_mut); mutex_lock(&iio_sysfs_trig_list_mut);
list_for_each_entry(t, &iio_sysfs_trig_list, l) list_for_each_entry(t, &iio_sysfs_trig_list, l)
if (id == t->id) { if (id == t->id) {
foundit = true; foundit = true;
break; break;
} }
if (!foundit) { if (!foundit) {
mutex_unlock(&iio_syfs_trig_list_mut); mutex_unlock(&iio_sysfs_trig_list_mut);
return -EINVAL; return -EINVAL;
} }
...@@ -202,7 +202,7 @@ static int iio_sysfs_trigger_remove(int id) ...@@ -202,7 +202,7 @@ static int iio_sysfs_trigger_remove(int id)
list_del(&t->l); list_del(&t->l);
kfree(t); kfree(t);
module_put(THIS_MODULE); module_put(THIS_MODULE);
mutex_unlock(&iio_syfs_trig_list_mut); mutex_unlock(&iio_sysfs_trig_list_mut);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment