Merge master.kernel.org:/pub/scm/linux/kernel/git/sfrench/cifs-2.6
[pandora-kernel.git] / drivers / media / video / saa7127.c
index 133f9e5..bd9c4f3 100644 (file)
@@ -142,6 +142,7 @@ struct i2c_reg_value {
 static const struct i2c_reg_value saa7129_init_config_extra[] = {
        { SAA7127_REG_OUTPUT_PORT_CONTROL,              0x38 },
        { SAA7127_REG_VTRIG,                            0xfa },
+       { 0, 0 }
 };
 
 static const struct i2c_reg_value saa7127_init_config_common[] = {
@@ -269,7 +270,7 @@ static const char * const wss_strs[] = {
        "letterbox 16:9 top",
        "invalid",
        "invalid",
-       "16:9 full format anamorphic"
+       "16:9 full format anamorphic",
        "4:3 full format",
        "invalid",
        "invalid",
@@ -613,17 +614,8 @@ static int saa7127_command(struct i2c_client *client,
                break;
 
 #ifdef CONFIG_VIDEO_ADV_DEBUG
-       case VIDIOC_INT_G_REGISTER:
-       {
-               struct v4l2_register *reg = arg;
-
-               if (reg->i2c_id != I2C_DRIVERID_SAA7127)
-                       return -EINVAL;
-               reg->val = saa7127_read(client, reg->reg & 0xff);
-               break;
-       }
-
-       case VIDIOC_INT_S_REGISTER:
+       case VIDIOC_DBG_G_REGISTER:
+       case VIDIOC_DBG_S_REGISTER:
        {
                struct v4l2_register *reg = arg;
 
@@ -631,7 +623,10 @@ static int saa7127_command(struct i2c_client *client,
                        return -EINVAL;
                if (!capable(CAP_SYS_ADMIN))
                        return -EPERM;
-               saa7127_write(client, reg->reg & 0xff, reg->val & 0xff);
+               if (cmd == VIDIOC_DBG_G_REGISTER)
+                       reg->val = saa7127_read(client, reg->reg & 0xff);
+               else
+                       saa7127_write(client, reg->reg & 0xff, reg->val & 0xff);
                break;
        }
 #endif