aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/gspca/sn9c20x.c
diff options
context:
space:
mode:
authorOndrej Zary <linux@rainbow-software.org>2013-08-30 16:54:23 -0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2013-09-26 06:19:09 -0400
commit1966bc2a48f12d5d11c4fbe0880955cc4bfda0f9 (patch)
tree6a1c4e50b81e194b1d60f0e62fd566f662b3657a /drivers/media/usb/gspca/sn9c20x.c
parent08149ecf2cbf788b5a0d01481e290f84e4660c06 (diff)
[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/sn9c20x.c')
-rw-r--r--drivers/media/usb/gspca/sn9c20x.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/usb/gspca/sn9c20x.c b/drivers/media/usb/gspca/sn9c20x.c
index f4453d52801b..2a38621cf718 100644
--- a/drivers/media/usb/gspca/sn9c20x.c
+++ b/drivers/media/usb/gspca/sn9c20x.c
@@ -1955,7 +1955,7 @@ static int sd_isoc_init(struct gspca_dev *gspca_dev)
1955 return 0; 1955 return 0;
1956 } 1956 }
1957 1957
1958 switch (gspca_dev->width) { 1958 switch (gspca_dev->pixfmt.width) {
1959 case 160: /* 160x120 */ 1959 case 160: /* 160x120 */
1960 gspca_dev->alt = 2; 1960 gspca_dev->alt = 2;
1961 break; 1961 break;
@@ -1985,8 +1985,8 @@ static int sd_start(struct gspca_dev *gspca_dev)
1985{ 1985{
1986 struct sd *sd = (struct sd *) gspca_dev; 1986 struct sd *sd = (struct sd *) gspca_dev;
1987 int mode = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv; 1987 int mode = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv;
1988 int width = gspca_dev->width; 1988 int width = gspca_dev->pixfmt.width;
1989 int height = gspca_dev->height; 1989 int height = gspca_dev->pixfmt.height;
1990 u8 fmt, scale = 0; 1990 u8 fmt, scale = 0;
1991 1991
1992 jpeg_define(sd->jpeg_hdr, height, width, 1992 jpeg_define(sd->jpeg_hdr, height, width,