aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/ov534.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/gspca/ov534.c')
-rw-r--r--drivers/media/video/gspca/ov534.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/media/video/gspca/ov534.c b/drivers/media/video/gspca/ov534.c
index 88ef03f6235b..0edf93973b1c 100644
--- a/drivers/media/video/gspca/ov534.c
+++ b/drivers/media/video/gspca/ov534.c
@@ -1243,34 +1243,26 @@ static int sd_querymenu(struct gspca_dev *gspca_dev,
1243} 1243}
1244 1244
1245/* get stream parameters (framerate) */ 1245/* get stream parameters (framerate) */
1246static int sd_get_streamparm(struct gspca_dev *gspca_dev, 1246static void sd_get_streamparm(struct gspca_dev *gspca_dev,
1247 struct v4l2_streamparm *parm) 1247 struct v4l2_streamparm *parm)
1248{ 1248{
1249 struct v4l2_captureparm *cp = &parm->parm.capture; 1249 struct v4l2_captureparm *cp = &parm->parm.capture;
1250 struct v4l2_fract *tpf = &cp->timeperframe; 1250 struct v4l2_fract *tpf = &cp->timeperframe;
1251 struct sd *sd = (struct sd *) gspca_dev; 1251 struct sd *sd = (struct sd *) gspca_dev;
1252 1252
1253 if (parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
1254 return -EINVAL;
1255
1256 cp->capability |= V4L2_CAP_TIMEPERFRAME; 1253 cp->capability |= V4L2_CAP_TIMEPERFRAME;
1257 tpf->numerator = 1; 1254 tpf->numerator = 1;
1258 tpf->denominator = sd->frame_rate; 1255 tpf->denominator = sd->frame_rate;
1259
1260 return 0;
1261} 1256}
1262 1257
1263/* set stream parameters (framerate) */ 1258/* set stream parameters (framerate) */
1264static int sd_set_streamparm(struct gspca_dev *gspca_dev, 1259static void sd_set_streamparm(struct gspca_dev *gspca_dev,
1265 struct v4l2_streamparm *parm) 1260 struct v4l2_streamparm *parm)
1266{ 1261{
1267 struct v4l2_captureparm *cp = &parm->parm.capture; 1262 struct v4l2_captureparm *cp = &parm->parm.capture;
1268 struct v4l2_fract *tpf = &cp->timeperframe; 1263 struct v4l2_fract *tpf = &cp->timeperframe;
1269 struct sd *sd = (struct sd *) gspca_dev; 1264 struct sd *sd = (struct sd *) gspca_dev;
1270 1265
1271 if (parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
1272 return -EINVAL;
1273
1274 /* Set requested framerate */ 1266 /* Set requested framerate */
1275 sd->frame_rate = tpf->denominator / tpf->numerator; 1267 sd->frame_rate = tpf->denominator / tpf->numerator;
1276 if (gspca_dev->streaming) 1268 if (gspca_dev->streaming)
@@ -1279,8 +1271,6 @@ static int sd_set_streamparm(struct gspca_dev *gspca_dev,
1279 /* Return the actual framerate */ 1271 /* Return the actual framerate */
1280 tpf->numerator = 1; 1272 tpf->numerator = 1;
1281 tpf->denominator = sd->frame_rate; 1273 tpf->denominator = sd->frame_rate;
1282
1283 return 0;
1284} 1274}
1285 1275
1286/* sub-driver description */ 1276/* sub-driver description */