mv_count is a counter used to move the vertical bars. Before this patch, it
where a static var. This works fine for just one device. However, when using
multiple devices, every device would increment it.
This patch moves it to its correct place: struct vivi_dev. So, now, each device
has its own data.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
        /* Several counters */
        int                        h,m,s,us,jiffies;
        char                       timestr[13];
+
+       int                        mv_count;    /* Controls bars movement */
 };
 
 struct vivi_fh {
        struct timeval ts;
        char *tmpbuf = kmalloc(wmax*2,GFP_KERNEL);
        void *vbuf=videobuf_to_vmalloc (&buf->vb);
-       /* FIXME: move to dev struct */
-       static int mv_count=0;
 
        if (!tmpbuf)
                return;
 
        for (h=0;h<hmax;h++) {
-               gen_line(tmpbuf,0,wmax,hmax,h,mv_count,
+               gen_line(tmpbuf, 0, wmax, hmax, h, dev->mv_count,
                         dev->timestr);
                /* FIXME: replacing to __copy_to_user */
                if (copy_to_user(vbuf+pos,tmpbuf,wmax*2)!=0)
                pos += wmax*2;
        }
 
-       mv_count++;
+       dev->mv_count++;
 
        kfree(tmpbuf);