diff options
author | Ondrej Zary <linux@rainbow-software.org> | 2013-08-30 22:54:23 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2013-09-26 12:19:09 +0200 |
commit | 1966bc2a48f12d5d11c4fbe0880955cc4bfda0f9 (patch) | |
tree | 6a1c4e50b81e194b1d60f0e62fd566f662b3657a /drivers/media/usb/gspca/stk1135.c | |
parent | [media] Add HCL T12Rg-H to STK webcam upside-down table (diff) | |
download | linux-1966bc2a48f12d5d11c4fbe0880955cc4bfda0f9.tar.xz linux-1966bc2a48f12d5d11c4fbe0880955cc4bfda0f9.zip |
[media] gspca: store current mode instead of individual parameters
Store complete current mode (struct v4l2_pix_format) in struct gspca_dev
instead of separate pixfmt, width and height parameters.
This is a preparation for variable resolution support.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/usb/gspca/stk1135.c')
-rw-r--r-- | drivers/media/usb/gspca/stk1135.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/usb/gspca/stk1135.c b/drivers/media/usb/gspca/stk1135.c index 585868835ace..5a6ed4916ed8 100644 --- a/drivers/media/usb/gspca/stk1135.c +++ b/drivers/media/usb/gspca/stk1135.c @@ -347,8 +347,8 @@ static void stk1135_configure_mt9m112(struct gspca_dev *gspca_dev) sensor_write(gspca_dev, cfg[i].reg, cfg[i].val); /* set output size */ - width = gspca_dev->cam.cam_mode[gspca_dev->curr_mode].width; - height = gspca_dev->cam.cam_mode[gspca_dev->curr_mode].height; + width = gspca_dev->pixfmt.width; + height = gspca_dev->pixfmt.height; if (width <= 640) { /* use context A (half readout speed by default) */ sensor_write(gspca_dev, 0x1a7, width); sensor_write(gspca_dev, 0x1aa, height); @@ -484,8 +484,8 @@ static int sd_start(struct gspca_dev *gspca_dev) reg_w(gspca_dev, STK1135_REG_CISPO + 3, 0x00); /* set capture end position */ - width = gspca_dev->cam.cam_mode[gspca_dev->curr_mode].width; - height = gspca_dev->cam.cam_mode[gspca_dev->curr_mode].height; + width = gspca_dev->pixfmt.width; + height = gspca_dev->pixfmt.height; reg_w(gspca_dev, STK1135_REG_CIEPO + 0, width & 0xff); reg_w(gspca_dev, STK1135_REG_CIEPO + 1, width >> 8); reg_w(gspca_dev, STK1135_REG_CIEPO + 2, height & 0xff); |