summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/gspca/mr97310a.c
diff options
context:
space:
mode:
authorOndrej Zary2013-08-30 22:54:23 +0200
committerMauro Carvalho Chehab2013-09-26 12:19:09 +0200
commit1966bc2a48f12d5d11c4fbe0880955cc4bfda0f9 (patch)
tree6a1c4e50b81e194b1d60f0e62fd566f662b3657a /drivers/media/usb/gspca/mr97310a.c
parent[media] Add HCL T12Rg-H to STK webcam upside-down table (diff)
downloadkernel-qcow2-linux-1966bc2a48f12d5d11c4fbe0880955cc4bfda0f9.tar.gz
kernel-qcow2-linux-1966bc2a48f12d5d11c4fbe0880955cc4bfda0f9.tar.xz
kernel-qcow2-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/mr97310a.c')
-rw-r--r--drivers/media/usb/gspca/mr97310a.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/usb/gspca/mr97310a.c b/drivers/media/usb/gspca/mr97310a.c
index 68bb2f359666..f006e29ca019 100644
--- a/drivers/media/usb/gspca/mr97310a.c
+++ b/drivers/media/usb/gspca/mr97310a.c
@@ -521,7 +521,7 @@ static int start_cif_cam(struct gspca_dev *gspca_dev)
if (sd->sensor_type)
data[5] = 0xbb;
- switch (gspca_dev->width) {
+ switch (gspca_dev->pixfmt.width) {
case 160:
data[9] |= 0x04; /* reg 8, 2:1 scale down from 320 */
/* fall thru */
@@ -618,7 +618,7 @@ static int start_vga_cam(struct gspca_dev *gspca_dev)
data[10] = 0x18;
}
- switch (gspca_dev->width) {
+ switch (gspca_dev->pixfmt.width) {
case 160:
data[9] |= 0x0c; /* reg 8, 4:1 scale down */
/* fall thru */
@@ -847,7 +847,7 @@ static void setexposure(struct gspca_dev *gspca_dev, s32 expo, s32 min_clockdiv)
u8 clockdiv = (60 * expo + 7999) / 8000;
/* Limit framerate to not exceed usb bandwidth */
- if (clockdiv < min_clockdiv && gspca_dev->width >= 320)
+ if (clockdiv < min_clockdiv && gspca_dev->pixfmt.width >= 320)
clockdiv = min_clockdiv;
else if (clockdiv < 2)
clockdiv = 2;