Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 241940
b: refs/heads/master
c: 6188a0f
h: refs/heads/master
v: v3
  • Loading branch information
Servaas Vandenberghe authored and Mauro Carvalho Chehab committed Mar 21, 2011
1 parent e9ede82 commit 8168625
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 35fa5d4c48fbb02d637c3659f00331aa33f0f029
refs/heads/master: 6188a0f151204d6f895822e8c0059b8951879a42
28 changes: 16 additions & 12 deletions trunk/drivers/media/video/pvrusb2/pvrusb2-hdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,31 +499,35 @@ static int ctrl_cropt_max_get(struct pvr2_ctrl *cptr, int *top)
return 0;
}

static int ctrl_cropw_max_get(struct pvr2_ctrl *cptr, int *val)
static int ctrl_cropw_max_get(struct pvr2_ctrl *cptr, int *width)
{
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw);
int stat, bleftend, cleft;

stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) {
return stat;
}
*val = 0;
if (cap->bounds.width > cptr->hdw->cropl_val) {
*val = cap->bounds.width - cptr->hdw->cropl_val;
}
bleftend = cap->bounds.left+cap->bounds.width;
cleft = cptr->hdw->cropl_val;

*width = cleft < bleftend ? bleftend-cleft : 0;
return 0;
}

static int ctrl_croph_max_get(struct pvr2_ctrl *cptr, int *val)
static int ctrl_croph_max_get(struct pvr2_ctrl *cptr, int *height)
{
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw);
int stat, btopend, ctop;

stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) {
return stat;
}
*val = 0;
if (cap->bounds.height > cptr->hdw->cropt_val) {
*val = cap->bounds.height - cptr->hdw->cropt_val;
}
btopend = cap->bounds.top+cap->bounds.height;
ctop = cptr->hdw->cropt_val;

*height = ctop < btopend ? btopend-ctop : 0;
return 0;
}

Expand Down

0 comments on commit 8168625

Please sign in to comment.