staging:iio: iio_trigger_unregister - remove rather strange search for what we already have.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
f6517f22d4
commit
582e548908
|
@ -134,14 +134,8 @@ EXPORT_SYMBOL(iio_trigger_register);
|
||||||
|
|
||||||
void iio_trigger_unregister(struct iio_trigger *trig_info)
|
void iio_trigger_unregister(struct iio_trigger *trig_info)
|
||||||
{
|
{
|
||||||
struct iio_trigger *cursor;
|
|
||||||
|
|
||||||
mutex_lock(&iio_trigger_list_lock);
|
mutex_lock(&iio_trigger_list_lock);
|
||||||
list_for_each_entry(cursor, &iio_trigger_list, list)
|
list_del(&trig_info->list);
|
||||||
if (cursor == trig_info) {
|
|
||||||
list_del(&cursor->list);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
mutex_unlock(&iio_trigger_list_lock);
|
mutex_unlock(&iio_trigger_list_lock);
|
||||||
|
|
||||||
iio_trigger_unregister_sysfs(trig_info);
|
iio_trigger_unregister_sysfs(trig_info);
|
||||||
|
|
Loading…
Reference in New Issue