aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/vivi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/vivi.c')
-rw-r--r--drivers/media/video/vivi.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c
index bacb311b4f24..d4cf55666731 100644
--- a/drivers/media/video/vivi.c
+++ b/drivers/media/video/vivi.c
@@ -270,10 +270,15 @@ static void gen_line(struct sg_to_addr to_addr[],int inipos,int pages,int wmax,
270 char *p,*s,*basep; 270 char *p,*s,*basep;
271 struct page *pg; 271 struct page *pg;
272 u8 chr,r,g,b,color; 272 u8 chr,r,g,b,color;
273 unsigned long flags;
274 spinlock_t spinlock;
275
276 spin_lock_init(&spinlock);
273 277
274 /* Get first addr pointed to pixel position */ 278 /* Get first addr pointed to pixel position */
275 oldpg=get_addr_pos(pos,pages,to_addr); 279 oldpg=get_addr_pos(pos,pages,to_addr);
276 pg=pfn_to_page(sg_dma_address(to_addr[oldpg].sg) >> PAGE_SHIFT); 280 pg=pfn_to_page(sg_dma_address(to_addr[oldpg].sg) >> PAGE_SHIFT);
281 spin_lock_irqsave(&spinlock,flags);
277 basep = kmap_atomic(pg, KM_BOUNCE_READ)+to_addr[oldpg].sg->offset; 282 basep = kmap_atomic(pg, KM_BOUNCE_READ)+to_addr[oldpg].sg->offset;
278 283
279 /* We will just duplicate the second pixel at the packet */ 284 /* We will just duplicate the second pixel at the packet */
@@ -376,6 +381,8 @@ static void gen_line(struct sg_to_addr to_addr[],int inipos,int pages,int wmax,
376 381
377end: 382end:
378 kunmap_atomic(basep, KM_BOUNCE_READ); 383 kunmap_atomic(basep, KM_BOUNCE_READ);
384 spin_unlock_irqrestore(&spinlock,flags);
385
379} 386}
380static void vivi_fillbuff(struct vivi_dev *dev,struct vivi_buffer *buf) 387static void vivi_fillbuff(struct vivi_dev *dev,struct vivi_buffer *buf)
381{ 388{