aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorSteven Toth <stoth@kernellabs.com>2010-09-05 08:49:43 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-21 05:55:19 -0400
commita1c592b766ee94aaf0e2549b8ba4d0298c328484 (patch)
tree7094d14f8f7bdb55c3f0ddeefda3fa35007dfda9 /drivers/media
parent2e732d64416b243883f753e4a00960c3f3709317 (diff)
[media] saa7164: saa7164-buffer.c line 274 bugfix
Mark buffers free when the dvb dma engine stops. Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/saa7164/saa7164-dvb.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/media/video/saa7164/saa7164-dvb.c b/drivers/media/video/saa7164/saa7164-dvb.c
index 2d21c01dea29..b305a01b3bde 100644
--- a/drivers/media/video/saa7164/saa7164-dvb.c
+++ b/drivers/media/video/saa7164/saa7164-dvb.c
@@ -143,6 +143,8 @@ static int saa7164_dvb_pause_port(struct saa7164_port *port)
143static int saa7164_dvb_stop_streaming(struct saa7164_port *port) 143static int saa7164_dvb_stop_streaming(struct saa7164_port *port)
144{ 144{
145 struct saa7164_dev *dev = port->dev; 145 struct saa7164_dev *dev = port->dev;
146 struct saa7164_buffer *buf;
147 struct list_head *p, *q;
146 int ret; 148 int ret;
147 149
148 dprintk(DBGLVL_DVB, "%s(port=%d)\n", __func__, port->nr); 150 dprintk(DBGLVL_DVB, "%s(port=%d)\n", __func__, port->nr);
@@ -151,6 +153,14 @@ static int saa7164_dvb_stop_streaming(struct saa7164_port *port)
151 ret = saa7164_dvb_acquire_port(port); 153 ret = saa7164_dvb_acquire_port(port);
152 ret = saa7164_dvb_stop_port(port); 154 ret = saa7164_dvb_stop_port(port);
153 155
156 /* Mark the hardware buffers as free */
157 mutex_lock(&port->dmaqueue_lock);
158 list_for_each_safe(p, q, &port->dmaqueue.list) {
159 buf = list_entry(p, struct saa7164_buffer, list);
160 buf->flags = SAA7164_BUFFER_FREE;
161 }
162 mutex_unlock(&port->dmaqueue_lock);
163
154 return ret; 164 return ret;
155} 165}
156 166