summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/mt9m001.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2011-09-09 07:06:50 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-11-03 18:28:59 -0200
commit443f483aa2494b93d73ba122cafdf2ef89989ed7 (patch)
tree8b94a6d4ef0696c0b9310dd2bb7bdadee1eb7249 /drivers/media/video/mt9m001.c
parent14178aa57ce6ac4f05b4df8ea9e010486ce83a76 (diff)
downloadlinux-443f483aa2494b93d73ba122cafdf2ef89989ed7.tar.gz
linux-443f483aa2494b93d73ba122cafdf2ef89989ed7.tar.bz2
linux-443f483aa2494b93d73ba122cafdf2ef89989ed7.zip
[media] V4L: mt9m001, mt9v022: use internally cached pixel code
Using the internally cached pixel code, instead of the one, provided by the soc-camera, removes one more use of struct soc_camera_device in these drivers. Also remove the no longer needed soc_camera_from_i2c() inline function. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/mt9m001.c')
-rw-r--r--drivers/media/video/mt9m001.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/media/video/mt9m001.c b/drivers/media/video/mt9m001.c
index 58cdcedf53de..63ae5c61c9bf 100644
--- a/drivers/media/video/mt9m001.c
+++ b/drivers/media/video/mt9m001.c
@@ -601,15 +601,9 @@ static int mt9m001_s_mbus_config(struct v4l2_subdev *sd,
const struct v4l2_mbus_config *cfg)
{
const struct i2c_client *client = v4l2_get_subdevdata(sd);
- struct soc_camera_device *icd = soc_camera_from_i2c(client);
struct soc_camera_link *icl = soc_camera_i2c_to_link(client);
- /*
- * Cannot use icd->current_fmt->host_fmt->bits_per_sample, because that
- * is the number of bits, that the host has to sample, not the number of
- * bits, that we have to send. See mx3_camera.c for an example of 10-bit
- * formats being truncated to 8 bits by the host.
- */
- unsigned int bps = soc_mbus_get_fmtdesc(icd->current_fmt->code)->bits_per_sample;
+ struct mt9m001 *mt9m001 = to_mt9m001(client);
+ unsigned int bps = soc_mbus_get_fmtdesc(mt9m001->fmt->code)->bits_per_sample;
if (icl->set_bus_param)
return icl->set_bus_param(icl, 1 << (bps - 1));