summaryrefslogtreecommitdiff
path: root/drivers/staging/most/aim-v4l2/video.c
diff options
context:
space:
mode:
authorChristian Gromm <christian.gromm@microchip.com>2016-06-06 13:23:06 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-15 17:17:03 (GMT)
commitdb5a48d595cfd27ba66625558d982205b46d11fd (patch)
tree354734249602dd4cb34b7214de2ba89726689133 /drivers/staging/most/aim-v4l2/video.c
parente494df039df0fc73587fda48752bfdbe88a6e7ce (diff)
downloadlinux-db5a48d595cfd27ba66625558d982205b46d11fd.tar.xz
staging: most: v4l2-aim: optimize list_for_each_entry_safe
As the function get_aim_dev() does not delete elements of the list, the use of macro list_for_each_entry_safe is not necessary. This patch replaces the macro list_for_each_entry_safe with the macro list_for_each_entry. Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/most/aim-v4l2/video.c')
-rw-r--r--drivers/staging/most/aim-v4l2/video.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/most/aim-v4l2/video.c b/drivers/staging/most/aim-v4l2/video.c
index 1fea839..6b7e220 100644
--- a/drivers/staging/most/aim-v4l2/video.c
+++ b/drivers/staging/most/aim-v4l2/video.c
@@ -393,11 +393,11 @@ static const struct video_device aim_videodev_template = {
static struct most_video_dev *get_aim_dev(
struct most_interface *iface, int channel_idx)
{
- struct most_video_dev *mdev, *tmp;
+ struct most_video_dev *mdev;
unsigned long flags;
spin_lock_irqsave(&list_lock, flags);
- list_for_each_entry_safe(mdev, tmp, &video_devices, list) {
+ list_for_each_entry(mdev, &video_devices, list) {
if (mdev->iface == iface && mdev->ch_idx == channel_idx) {
spin_unlock_irqrestore(&list_lock, flags);
return mdev;