diff options
author | Kevin Hilman <khilman@baylibre.com> | 2016-12-07 16:30:22 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-01-31 07:59:12 -0200 |
commit | 2d40cb3f0d710bb4c656f9b2f021c964f501baea (patch) | |
tree | 07f0c2bf85dc9d897cef42883a2c8db865dca4f8 /drivers | |
parent | bff782d78a96ff9bd50fd6d726fdb9d4b033795e (diff) |
[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: Kevin Hilman <khilman@baylibre.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/platform/davinci/vpif_capture.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c index d489f047a6fa..54c439705b20 100644 --- a/drivers/media/platform/davinci/vpif_capture.c +++ b/drivers/media/platform/davinci/vpif_capture.c @@ -1475,7 +1475,10 @@ static __init int vpif_probe(struct platform_device *pdev) } 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++) { subdevdata = &vpif_obj.config->subdev_info[i]; vpif_obj.sd[i] = |