[media] tw686x-kh: use the cached value
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Wed, 20 Apr 2016 16:39:20 +0000 (13:39 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Wed, 20 Apr 2016 16:40:07 +0000 (13:40 -0300)
the dma_requests field is cached, but cache is not used:

drivers/staging/media/tw686x-kh/tw686x-kh-video.c: In function 'tw686x_video_irq':
drivers/staging/media/tw686x-kh/tw686x-kh-video.c:622:6: warning: variable 'requests' set but not used [-Wunused-but-set-variable]
  u32 requests;
      ^

Use the cache instead, as it seems reading it needs to be done
with spin lock taken.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/staging/media/tw686x-kh/tw686x-kh-video.c

index 2fbc3cb..0650c29 100644 (file)
@@ -625,7 +625,7 @@ int tw686x_video_irq(struct tw686x_dev *dev)
        requests = dev->dma_requests;
        spin_unlock_irqrestore(&dev->irq_lock, flags);
 
-       if (dev->dma_requests & dev->video_active) {
+       if (requests & dev->video_active) {
                wake_up_interruptible_all(&dev->video_thread_wait);
                handled = 1;
        }