aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2010-01-08 06:08:12 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-02-26 13:10:31 -0500
commit509245171ae76e08f657fe825b739d99f5701f09 (patch)
tree3fde971dc9366f0e750f3f7de0f75c4363e1c9fb /drivers
parent77880ba3335e60acd0d6a818a7cdddaf0a5d601f (diff)
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')
-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 87deb72f89d0..1c403a2fccbe 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)
6783{ 6783{
6784 struct sd *sd = (struct sd *) gspca_dev; 6784 struct sd *sd = (struct sd *) gspca_dev;
6785 struct usb_device *dev = gspca_dev->dev; 6785 struct usb_device *dev = gspca_dev->dev;
6786 const struct usb_action *zc3_init;
6787 int mode; 6786 int mode;
6788 static const struct usb_action *init_tb[SENSOR_MAX][2] = { 6787 static const struct usb_action *init_tb[SENSOR_MAX][2] = {
6789 {adcm2700_Initial, adcm2700_InitialScale}, /* 0 */ 6788 {adcm2700_Initial, adcm2700_InitialScale}, /* 0 */
@@ -6816,8 +6815,7 @@ static int sd_start(struct gspca_dev *gspca_dev)
6816 0x21); /* JPEG 422 */ 6815 0x21); /* JPEG 422 */
6817 jpeg_set_qual(sd->jpeg_hdr, sd->quality); 6816 jpeg_set_qual(sd->jpeg_hdr, sd->quality);
6818 6817
6819 mode = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv; 6818 mode = gspca_dev->cam.cam_mode[gspca_dev->curr_mode].priv;
6820 zc3_init = init_tb[sd->sensor][mode];
6821 switch (sd->sensor) { 6819 switch (sd->sensor) {
6822 case SENSOR_HV7131C: 6820 case SENSOR_HV7131C:
6823 zcxx_probeSensor(gspca_dev); 6821 zcxx_probeSensor(gspca_dev);
@@ -6826,7 +6824,7 @@ static int sd_start(struct gspca_dev *gspca_dev)
6826 usb_exchange(gspca_dev, pas106b_Initial_com); 6824 usb_exchange(gspca_dev, pas106b_Initial_com);
6827 break; 6825 break;
6828 } 6826 }
6829 usb_exchange(gspca_dev, zc3_init); 6827 usb_exchange(gspca_dev, init_tb[sd->sensor][mode]);
6830 6828
6831 switch (sd->sensor) { 6829 switch (sd->sensor) {
6832 case SENSOR_ADCM2700: 6830 case SENSOR_ADCM2700: