diff options
author | David S. Miller <davem@davemloft.net> | 2010-02-28 22:23:06 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-28 22:23:06 -0500 |
commit | 47871889c601d8199c51a4086f77eebd77c29b0b (patch) | |
tree | 40cdcac3bff0ee40cc33dcca61d0577cdf965f77 /drivers/media/video/ov772x.c | |
parent | c16cc0b464b8876cfd57ce1c1dbcb6f9a6a0bce3 (diff) | |
parent | 30ff056c42c665b9ea535d8515890857ae382540 (diff) |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts:
drivers/firmware/iscsi_ibft.c
Diffstat (limited to 'drivers/media/video/ov772x.c')
-rw-r--r-- | drivers/media/video/ov772x.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/drivers/media/video/ov772x.c b/drivers/media/video/ov772x.c index 3a45e945a528..7f8ece30c77b 100644 --- a/drivers/media/video/ov772x.c +++ b/drivers/media/video/ov772x.c | |||
@@ -547,7 +547,6 @@ static const struct v4l2_queryctrl ov772x_controls[] = { | |||
547 | }, | 547 | }, |
548 | }; | 548 | }; |
549 | 549 | ||
550 | |||
551 | /* | 550 | /* |
552 | * general function | 551 | * general function |
553 | */ | 552 | */ |
@@ -634,7 +633,12 @@ static unsigned long ov772x_query_bus_param(struct soc_camera_device *icd) | |||
634 | struct soc_camera_link *icl = to_soc_camera_link(icd); | 633 | struct soc_camera_link *icl = to_soc_camera_link(icd); |
635 | unsigned long flags = SOCAM_PCLK_SAMPLE_RISING | SOCAM_MASTER | | 634 | unsigned long flags = SOCAM_PCLK_SAMPLE_RISING | SOCAM_MASTER | |
636 | SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_HSYNC_ACTIVE_HIGH | | 635 | SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_HSYNC_ACTIVE_HIGH | |
637 | SOCAM_DATA_ACTIVE_HIGH | priv->info->buswidth; | 636 | SOCAM_DATA_ACTIVE_HIGH; |
637 | |||
638 | if (priv->info->flags & OV772X_FLAG_8BIT) | ||
639 | flags |= SOCAM_DATAWIDTH_8; | ||
640 | else | ||
641 | flags |= SOCAM_DATAWIDTH_10; | ||
638 | 642 | ||
639 | return soc_camera_apply_sensor_flags(icl, flags); | 643 | return soc_camera_apply_sensor_flags(icl, flags); |
640 | } | 644 | } |
@@ -1040,15 +1044,6 @@ static int ov772x_video_probe(struct soc_camera_device *icd, | |||
1040 | return -ENODEV; | 1044 | return -ENODEV; |
1041 | 1045 | ||
1042 | /* | 1046 | /* |
1043 | * ov772x only use 8 or 10 bit bus width | ||
1044 | */ | ||
1045 | if (SOCAM_DATAWIDTH_10 != priv->info->buswidth && | ||
1046 | SOCAM_DATAWIDTH_8 != priv->info->buswidth) { | ||
1047 | dev_err(&client->dev, "bus width error\n"); | ||
1048 | return -ENODEV; | ||
1049 | } | ||
1050 | |||
1051 | /* | ||
1052 | * check and show product ID and manufacturer ID | 1047 | * check and show product ID and manufacturer ID |
1053 | */ | 1048 | */ |
1054 | pid = i2c_smbus_read_byte_data(client, PID); | 1049 | pid = i2c_smbus_read_byte_data(client, PID); |
@@ -1130,7 +1125,6 @@ static int ov772x_probe(struct i2c_client *client, | |||
1130 | const struct i2c_device_id *did) | 1125 | const struct i2c_device_id *did) |
1131 | { | 1126 | { |
1132 | struct ov772x_priv *priv; | 1127 | struct ov772x_priv *priv; |
1133 | struct ov772x_camera_info *info; | ||
1134 | struct soc_camera_device *icd = client->dev.platform_data; | 1128 | struct soc_camera_device *icd = client->dev.platform_data; |
1135 | struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); | 1129 | struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); |
1136 | struct soc_camera_link *icl; | 1130 | struct soc_camera_link *icl; |
@@ -1145,8 +1139,6 @@ static int ov772x_probe(struct i2c_client *client, | |||
1145 | if (!icl || !icl->priv) | 1139 | if (!icl || !icl->priv) |
1146 | return -EINVAL; | 1140 | return -EINVAL; |
1147 | 1141 | ||
1148 | info = icl->priv; | ||
1149 | |||
1150 | if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) { | 1142 | if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) { |
1151 | dev_err(&adapter->dev, | 1143 | dev_err(&adapter->dev, |
1152 | "I2C-Adapter doesn't support " | 1144 | "I2C-Adapter doesn't support " |
@@ -1158,7 +1150,7 @@ static int ov772x_probe(struct i2c_client *client, | |||
1158 | if (!priv) | 1150 | if (!priv) |
1159 | return -ENOMEM; | 1151 | return -ENOMEM; |
1160 | 1152 | ||
1161 | priv->info = info; | 1153 | priv->info = icl->priv; |
1162 | 1154 | ||
1163 | v4l2_i2c_subdev_init(&priv->subdev, client, &ov772x_subdev_ops); | 1155 | v4l2_i2c_subdev_init(&priv->subdev, client, &ov772x_subdev_ops); |
1164 | 1156 | ||