Skip to content

Commit

Permalink
staging:iio: iio_trigger_unregister - remove rather strange search fo…
Browse files Browse the repository at this point in the history
…r what we already have.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Apr 26, 2011
1 parent f6517f2 commit 582e548
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions drivers/staging/iio/industrialio-trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,8 @@ EXPORT_SYMBOL(iio_trigger_register);

void iio_trigger_unregister(struct iio_trigger *trig_info)
{
struct iio_trigger *cursor;

mutex_lock(&iio_trigger_list_lock);
list_for_each_entry(cursor, &iio_trigger_list, list)
if (cursor == trig_info) {
list_del(&cursor->list);
break;
}
list_del(&trig_info->list);
mutex_unlock(&iio_trigger_list_lock);

iio_trigger_unregister_sysfs(trig_info);
Expand Down

0 comments on commit 582e548

Please sign in to comment.