summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/em28xx/em28xx-video.c
diff options
context:
space:
mode:
authorFrank Schaefer <fschaefer.oss@googlemail.com>2014-03-24 16:33:19 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-05-23 13:22:06 -0300
commitd7dc18da634dcb5f9023660dca85b6be1e401264 (patch)
treeaec23c28897616fc3c40cc49c535069ce4c65ead /drivers/media/usb/em28xx/em28xx-video.c
parent58159171c7f201e5d6ea2666c7b3857e782a2861 (diff)
downloadblackbird-op-linux-d7dc18da634dcb5f9023660dca85b6be1e401264.tar.gz
blackbird-op-linux-d7dc18da634dcb5f9023660dca85b6be1e401264.zip
[media] em28xx: move sensor parameter fields from struct em28xx to struct v4l2
Move camera sensor resolution and xtal out of em28xx common struct, as thore are used only by the em28xx v4l2 submodule. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/usb/em28xx/em28xx-video.c')
-rw-r--r--drivers/media/usb/em28xx/em28xx-video.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c
index 03cfa3eeafc2..da7eb21f16b5 100644
--- a/drivers/media/usb/em28xx/em28xx-video.c
+++ b/drivers/media/usb/em28xx/em28xx-video.c
@@ -144,8 +144,10 @@ static struct em28xx_fmt format[] = {
/*FIXME: maxw should be dependent of alt mode */
static inline unsigned int norm_maxw(struct em28xx *dev)
{
+ struct em28xx_v4l2 *v4l2 = dev->v4l2;
+
if (dev->board.is_webcam)
- return dev->sensor_xres;
+ return v4l2->sensor_xres;
if (dev->board.max_range_640_480)
return 640;
@@ -158,7 +160,7 @@ static inline unsigned int norm_maxh(struct em28xx *dev)
struct em28xx_v4l2 *v4l2 = dev->v4l2;
if (dev->board.is_webcam)
- return dev->sensor_yres;
+ return v4l2->sensor_yres;
if (dev->board.max_range_640_480)
return 480;
OpenPOWER on IntegriCloud