iio: Add a helper to free a list of IIO device attributes
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 7 Oct 2013 11:50:00 +0000 (12:50 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sat, 12 Oct 2013 11:17:34 +0000 (12:17 +0100)
We have the same code to free a IIO device attribute list in multiple place.
This patch adds a new helper function to take care of this and replaces the
custom instances with a call to the helper function. Note that we do not need to
call list_del() for each of the list items since we will never look at any of
the list items nor the list itself again.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/iio_core.h
drivers/iio/industrialio-buffer.c
drivers/iio/industrialio-core.c
drivers/iio/industrialio-event.c

Simple merge
Simple merge
Simple merge
Simple merge