[media] av7110: fix sparse warning
authorHans Verkuil <hans.verkuil@cisco.com>
Sat, 13 Dec 2014 11:52:51 +0000 (08:52 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 23 Dec 2014 12:33:59 +0000 (10:33 -0200)
drivers/media/pci/ttpci/av7110.c:1226:15: warning: memset with byte count of 192512

Instead of memsetting this in one go, loop over each line and memset each line
separately.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/pci/ttpci/av7110.c

index c1f0617a69733df52b924668457a955ab39806f1..45199a12b9d931989d9fabb6b4963843c2a16226 100644 (file)
@@ -1219,11 +1219,14 @@ static int stop_ts_capture(struct av7110 *budget)
 
 static int start_ts_capture(struct av7110 *budget)
 {
+       unsigned y;
+
        dprintk(2, "budget: %p\n", budget);
 
        if (budget->feeding1)
                return ++budget->feeding1;
-       memset(budget->grabbing, 0x00, TS_BUFLEN);
+       for (y = 0; y < TS_HEIGHT; y++)
+               memset(budget->grabbing + y * TS_WIDTH, 0x00, TS_WIDTH);
        budget->ttbp = 0;
        SAA7146_ISR_CLEAR(budget->dev, MASK_10);  /* VPE */
        SAA7146_IER_ENABLE(budget->dev, MASK_10); /* VPE */