summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2010-01-08 08:08:12 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-02-26 15:10:31 -0300
commit509245171ae76e08f657fe825b739d99f5701f09 (patch)
tree3fde971dc9366f0e750f3f7de0f75c4363e1c9fb /drivers/media
parent77880ba3335e60acd0d6a818a7cdddaf0a5d601f (diff)
downloadop-kernel-dev-509245171ae76e08f657fe825b739d99f5701f09.zip
op-kernel-dev-509245171ae76e08f657fe825b739d99f5701f09.tar.gz
V4L/DVB (13923): gspca - zc3xx: Simplify code.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/gspca/zc3xx.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c
index 87deb72..1c403a2 100644
--- a/drivers/media/video/gspca/zc3xx.c
+++ b/drivers/media/video/gspca/zc3xx.c
@@ -6783,7 +6783,6 @@ static int sd_start(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;
struct usb_device *dev = gspca_dev->dev;
- const struct usb_action *zc3_init;
int mode;
static const struct usb_action *init_tb[SENSOR_MAX][2] = {
{adcm2700_Initial, adcm2700_InitialScale}, /* 0 */
@@ -6816,8 +6815,7 @@ static int sd_start(struct gspca_dev *gspca_dev)
0x21); /* JPEG 422 */
jpeg_set_qual(sd->jpeg_hdr, sd->quality);
- mode = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv;
- zc3_init = init_tb[sd->sensor][mode];
+ mode = gspca_dev->cam.cam_mode[gspca_dev->curr_mode].priv;
switch (sd->sensor) {
case SENSOR_HV7131C:
zcxx_probeSensor(gspca_dev);
@@ -6826,7 +6824,7 @@ static int sd_start(struct gspca_dev *gspca_dev)
usb_exchange(gspca_dev, pas106b_Initial_com);
break;
}
- usb_exchange(gspca_dev, zc3_init);
+ usb_exchange(gspca_dev, init_tb[sd->sensor][mode]);
switch (sd->sensor) {
case SENSOR_ADCM2700:
OpenPOWER on IntegriCloud