From: Jean-François Moine Date: Wed, 14 Jul 2010 09:21:16 +0000 (-0300) Subject: V4L/DVB: gspca - main: Fix a compilation warning X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=a2ba6f27cd2c66ad1119e0354a828a1be715c2f1;p=openwrt%2Fstaging%2Fblogic.git V4L/DVB: gspca - main: Fix a compilation warning Reported-by: Justin P. Mattock Signed-off-by: Jean-François Moine Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index 11b0e3557c1b..af7e042fd19f 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c @@ -1467,7 +1467,8 @@ static int vidioc_reqbufs(struct file *file, void *priv, struct gspca_dev *gspca_dev = priv; int i, ret = 0, streaming; - switch (rb->memory) { + i = rb->memory; /* (avoid compilation warning) */ + switch (i) { case GSPCA_MEMORY_READ: /* (internal call) */ case V4L2_MEMORY_MMAP: case V4L2_MEMORY_USERPTR: