From: Jonathan Cameron Date: Fri, 15 Apr 2011 17:55:54 +0000 (+0100) Subject: staging:iio: iio_trigger_unregister - remove rather strange search for what we alread... X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=582e548908729dd2f3e183fda5a8b7c2e2ca0b0e;p=openwrt%2Fstaging%2Fblogic.git staging:iio: iio_trigger_unregister - remove rather strange search for what we already have. Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/iio/industrialio-trigger.c b/drivers/staging/iio/industrialio-trigger.c index 714ce06f9dbc..083847c5c2d8 100644 --- a/drivers/staging/iio/industrialio-trigger.c +++ b/drivers/staging/iio/industrialio-trigger.c @@ -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);