static DEFINE_MUTEX(pvr2_unit_mtx);
static int ctlchg;
-static int initusbreset = 1;
static int procreload;
static int tuner[PVR_NUM] = { [0 ... PVR_NUM-1] = -1 };
static int tolerance[PVR_NUM] = { [0 ... PVR_NUM-1] = 0 };
MODULE_PARM_DESC(ctlchg, "0=optimize ctl change 1=always accept new ctl value");
module_param(init_pause_msec, int, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(init_pause_msec, "hardware initialization settling delay");
-module_param(initusbreset, int, S_IRUGO|S_IWUSR);
-MODULE_PARM_DESC(initusbreset, "Do USB reset device on probe");
module_param(procreload, int, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(procreload,
"Attempt init failure recovery with firmware reload");
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) {
- /* Keep checkpatch.pl quiet */
return stat;
}
*left = cap->bounds.left;
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) {
- /* Keep checkpatch.pl quiet */
return stat;
}
*left = cap->bounds.left;
if (cap->bounds.width > cptr->hdw->cropw_val) {
- /* This statement is present purely to shut up
- checkpatch.pl */
*left += cap->bounds.width - cptr->hdw->cropw_val;
}
return 0;
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) {
- /* Keep checkpatch.pl quiet */
return stat;
}
*top = cap->bounds.top;
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) {
- /* Keep checkpatch.pl quiet */
return stat;
}
*top = cap->bounds.top;
if (cap->bounds.height > cptr->hdw->croph_val) {
- /* Keep checkpatch.pl quiet */
*top += cap->bounds.height - cptr->hdw->croph_val;
}
return 0;
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) {
- /* Keep checkpatch.pl quiet */
return stat;
}
*val = 0;
if (cap->bounds.width > cptr->hdw->cropl_val) {
- /* Keep checkpatch.pl quiet */
*val = cap->bounds.width - cptr->hdw->cropl_val;
}
return 0;
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) {
- /* Keep checkpatch.pl quiet */
return stat;
}
*val = 0;
if (cap->bounds.height > cptr->hdw->cropt_val) {
- /* Keep checkpatch.pl quiet */
*val = cap->bounds.height - cptr->hdw->cropt_val;
}
return 0;
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) {
- /* Keep checkpatch.pl quiet */
return stat;
}
*val = cap->bounds.left;
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) {
- /* Keep checkpatch.pl quiet */
return stat;
}
*val = cap->bounds.top;
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) {
- /* Keep checkpatch.pl quiet */
return stat;
}
*val = cap->bounds.width;
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) {
- /* Keep checkpatch.pl quiet */
return stat;
}
*val = cap->bounds.height;
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) {
- /* Keep checkpatch.pl quiet */
return stat;
}
*val = cap->defrect.left;
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) {
- /* Keep checkpatch.pl quiet */
return stat;
}
*val = cap->defrect.top;
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) {
- /* Keep checkpatch.pl quiet */
return stat;
}
*val = cap->defrect.width;
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) {
- /* Keep checkpatch.pl quiet */
return stat;
}
*val = cap->defrect.height;
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) {
- /* Keep checkpatch.pl quiet */
return stat;
}
*val = cap->pixelaspect.numerator;
struct v4l2_cropcap *cap = &cptr->hdw->cropcap_info;
int stat = pvr2_hdw_check_cropcap(cptr->hdw);
if (stat != 0) {
- /* Keep checkpatch.pl quiet */
return stat;
}
*val = cap->pixelaspect.denominator;
}
hdw->fw1_state = FW1_STATE_OK;
- if (initusbreset) {
- pvr2_hdw_device_reset(hdw);
- }
if (!pvr2_hdw_dev_ok(hdw)) return;
for (idx = 0; idx < hdw->hdw_desc->client_modules.cnt; idx++) {
static int pvr2_hdw_check_cropcap(struct pvr2_hdw *hdw)
{
if (!hdw->cropcap_stale) {
- /* Keep checkpatch.pl quiet */
return 0;
}
pvr2_i2c_core_status_poll(hdw);
if (hdw->cropcap_stale) {
- /* Keep checkpatch.pl quiet */
return -EIO;
}
return 0;
LOCK_TAKE(hdw->big_lock);
stat = pvr2_hdw_check_cropcap(hdw);
if (!stat) {
- /* Keep checkpatch.pl quiet */
memcpy(pp, &hdw->cropcap_info, sizeof(hdw->cropcap_info));
}
LOCK_GIVE(hdw->big_lock);