linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / usb / media / sn9c102_tas5110c1b.c
index 690d621..32ddf23 100644 (file)
@@ -2,7 +2,7 @@
  * Plug-in for TAS5110C1B image sensor connected to the SN9C10x PC Camera  *
  * Controllers                                                             *
  *                                                                         *
- * Copyright (C) 2004-2005 by Luca Risolia <luca.risolia@studio.unibo.it>  *
+ * Copyright (C) 2004-2006 by Luca Risolia <luca.risolia@studio.unibo.it>  *
  *                                                                         *
  * This program is free software; you can redistribute it and/or modify    *
  * it under the terms of the GNU General Public License as published by    *
@@ -24,8 +24,6 @@
 
 static struct sn9c102_sensor tas5110c1b;
 
-static struct v4l2_control tas5110c1b_gain;
-
 
 static int tas5110c1b_init(struct sn9c102_device* cam)
 {
@@ -46,21 +44,6 @@ static int tas5110c1b_init(struct sn9c102_device* cam)
 }
 
 
-static int tas5110c1b_get_ctrl(struct sn9c102_device* cam, 
-                               struct v4l2_control* ctrl)
-{
-       switch (ctrl->id) {
-       case V4L2_CID_GAIN:
-               ctrl->value = tas5110c1b_gain.value;
-               break;
-       default:
-               return -EINVAL;
-       }
-
-       return 0;
-}
-
-
 static int tas5110c1b_set_ctrl(struct sn9c102_device* cam, 
                                const struct v4l2_control* ctrl)
 {
@@ -68,8 +51,7 @@ static int tas5110c1b_set_ctrl(struct sn9c102_device* cam,
 
        switch (ctrl->id) {
        case V4L2_CID_GAIN:
-               if (!(err += sn9c102_i2c_write(cam, 0x20, 0xf6 - ctrl->value)))
-                       tas5110c1b_gain.value = ctrl->value;
+               err += sn9c102_i2c_write(cam, 0x20, 0xf6 - ctrl->value);
                break;
        default:
                return -EINVAL;
@@ -147,7 +129,6 @@ static struct sn9c102_sensor tas5110c1b = {
                        .height = 288,
                },
        },
-       .get_ctrl = &tas5110c1b_get_ctrl,
        .set_crop = &tas5110c1b_set_crop,
        .pix_format = {
                .width = 352,