]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/pvrusb2/pvrusb2-hdw.c
Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
[linux-2.6-omap-h63xx.git] / drivers / media / video / pvrusb2 / pvrusb2-hdw.c
index 9bb59b2de91769460765b776bd3929c17d0d0510..5b81ba469641c89b302a777d9f41f62043609133 100644 (file)
@@ -60,7 +60,6 @@ static struct pvr2_hdw *unit_pointers[PVR_NUM] = {[ 0 ... PVR_NUM-1 ] = NULL};
 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 };
@@ -71,8 +70,6 @@ module_param(ctlchg, int, S_IRUGO|S_IWUSR);
 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");
@@ -408,7 +405,6 @@ static int ctrl_cropl_min_get(struct pvr2_ctrl *cptr, int *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;
@@ -420,13 +416,10 @@ static int ctrl_cropl_max_get(struct pvr2_ctrl *cptr, int *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;
@@ -437,7 +430,6 @@ static int ctrl_cropt_min_get(struct pvr2_ctrl *cptr, int *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;
@@ -449,12 +441,10 @@ static int ctrl_cropt_max_get(struct pvr2_ctrl *cptr, int *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;
@@ -465,12 +455,10 @@ static int ctrl_cropw_max_get(struct pvr2_ctrl *cptr, int *val)
        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;
@@ -481,12 +469,10 @@ static int ctrl_croph_max_get(struct pvr2_ctrl *cptr, int *val)
        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;
@@ -497,7 +483,6 @@ static int ctrl_get_cropcapbl(struct pvr2_ctrl *cptr, int *val)
        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;
@@ -509,7 +494,6 @@ static int ctrl_get_cropcapbt(struct pvr2_ctrl *cptr, int *val)
        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;
@@ -521,7 +505,6 @@ static int ctrl_get_cropcapbw(struct pvr2_ctrl *cptr, int *val)
        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;
@@ -533,7 +516,6 @@ static int ctrl_get_cropcapbh(struct pvr2_ctrl *cptr, int *val)
        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;
@@ -545,7 +527,6 @@ static int ctrl_get_cropcapdl(struct pvr2_ctrl *cptr, int *val)
        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;
@@ -557,7 +538,6 @@ static int ctrl_get_cropcapdt(struct pvr2_ctrl *cptr, int *val)
        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;
@@ -569,7 +549,6 @@ static int ctrl_get_cropcapdw(struct pvr2_ctrl *cptr, int *val)
        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;
@@ -581,7 +560,6 @@ static int ctrl_get_cropcapdh(struct pvr2_ctrl *cptr, int *val)
        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;
@@ -593,7 +571,6 @@ static int ctrl_get_cropcappan(struct pvr2_ctrl *cptr, int *val)
        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;
@@ -605,7 +582,6 @@ static int ctrl_get_cropcappad(struct pvr2_ctrl *cptr, int *val)
        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;
@@ -1988,9 +1964,6 @@ static void pvr2_hdw_setup_low(struct pvr2_hdw *hdw)
        }
        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++) {
@@ -3008,12 +2981,10 @@ void pvr2_hdw_execute_tuner_poll(struct pvr2_hdw *hdw)
 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;
@@ -3027,7 +2998,6 @@ int pvr2_hdw_get_cropcap(struct pvr2_hdw *hdw, struct v4l2_cropcap *pp)
        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);