Commit 2d40cb3f authored by Kevin Hilman's avatar Kevin Hilman Committed by Mauro Carvalho Chehab

[media] davinci: vpif_capture: remove hard-coded I2C adapter id

Remove hard-coded I2C adapter in favor of getting the
ID from platform_data.
Signed-off-by: default avatarKevin Hilman <khilman@baylibre.com>
Acked-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent bff782d7
...@@ -1475,7 +1475,10 @@ static __init int vpif_probe(struct platform_device *pdev) ...@@ -1475,7 +1475,10 @@ static __init int vpif_probe(struct platform_device *pdev)
} }
if (!vpif_obj.config->asd_sizes) { if (!vpif_obj.config->asd_sizes) {
i2c_adap = i2c_get_adapter(1); int i2c_id = vpif_obj.config->i2c_adapter_id;
i2c_adap = i2c_get_adapter(i2c_id);
WARN_ON(!i2c_adap);
for (i = 0; i < subdev_count; i++) { for (i = 0; i < subdev_count; i++) {
subdevdata = &vpif_obj.config->subdev_info[i]; subdevdata = &vpif_obj.config->subdev_info[i];
vpif_obj.sd[i] = vpif_obj.sd[i] =
......
...@@ -78,6 +78,7 @@ struct vpif_capture_config { ...@@ -78,6 +78,7 @@ struct vpif_capture_config {
struct vpif_capture_chan_config chan_config[VPIF_CAPTURE_MAX_CHANNELS]; struct vpif_capture_chan_config chan_config[VPIF_CAPTURE_MAX_CHANNELS];
struct vpif_subdev_info *subdev_info; struct vpif_subdev_info *subdev_info;
int subdev_count; int subdev_count;
int i2c_adapter_id;
const char *card_name; const char *card_name;
struct v4l2_async_subdev **asd; /* Flat array, arranged in groups */ struct v4l2_async_subdev **asd; /* Flat array, arranged in groups */
int *asd_sizes; /* 0-terminated array of asd group sizes */ int *asd_sizes; /* 0-terminated array of asd group sizes */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment