]> Pileus Git - ~andy/linux/blobdiff - drivers/media/video/pvrusb2/pvrusb2-hdw.c
V4L/DVB (11189): pvrusb2: Deal with space-after-comma coding style idiocy
[~andy/linux] / drivers / media / video / pvrusb2 / pvrusb2-hdw.c
index 937c85c5c0377794ba29c979abb3cfd34209d6b8..029cdf411df00808e606ad938363265a059df029 100644 (file)
@@ -2045,6 +2045,7 @@ static int pvr2_hdw_load_subdev(struct pvr2_hdw *hdw,
         * and every other place where I can find examples of this, the
         * "chipid" appears to just be the module name again.  So here we
         * just do the same thing. */
+       hdw->i2c_adap.class = 0;
        if (i2ccnt == 1) {
                pvr2_trace(PVR2_TRACE_INIT,
                           "Module ID %u:"
@@ -2062,6 +2063,7 @@ static int pvr2_hdw_load_subdev(struct pvr2_hdw *hdw,
                                                fname, fname,
                                                i2caddr);
        }
+       hdw->i2c_adap.class = I2C_CLASS_TV_ANALOG;
 
        if (!sd) {
                pvr2_trace(PVR2_TRACE_ERROR_LEGS,
@@ -2943,7 +2945,7 @@ static void pvr2_subdev_update(struct pvr2_hdw *hdw)
        pvr2_subdev_update_func fp;
 
        if (hdw->input_dirty || hdw->std_dirty) {
-               pvr2_trace(PVR2_TRACE_CHIPS,"subdev v4l2 set_standard");
+               pvr2_trace(PVR2_TRACE_CHIPS, "subdev v4l2 set_standard");
                if (hdw->input_val == PVR2_CVAL_INPUT_RADIO) {
                        v4l2_device_call_all(&hdw->v4l2_dev, 0,
                                             tuner, s_radio);
@@ -3236,15 +3238,15 @@ static int pvr2_hdw_commit_execute(struct pvr2_hdw *hdw)
                }
        }
 
+       /* Check and update state for all sub-devices. */
+       pvr2_subdev_update(hdw);
+
        for (idx = 0; idx < hdw->control_cnt; idx++) {
                cptr = hdw->controls + idx;
                if (!cptr->info->clear_dirty) continue;
                cptr->info->clear_dirty(cptr);
        }
 
-       /* Check and update state for all sub-devices. */
-       pvr2_subdev_update(hdw);
-
        /* Now execute i2c core update */
        pvr2_i2c_core_sync(hdw);
 
@@ -4855,7 +4857,7 @@ static unsigned int pvr2_hdw_report_unlocked(struct pvr2_hdw *hdw,int which,
                unsigned int id;
                ccnt = scnprintf(buf,
                                 acnt,
-                                "Associted v4l2_subdev drivers:");
+                                "Associated v4l2_subdev drivers:");
                tcnt += ccnt;
                v4l2_device_for_each_subdev(sd, &hdw->v4l2_dev) {
                        id = sd->grp_id;
@@ -4863,10 +4865,16 @@ static unsigned int pvr2_hdw_report_unlocked(struct pvr2_hdw *hdw,int which,
                        if (id < ARRAY_SIZE(module_names)) {
                                p = module_names[id];
                        }
-                       if (!p) p = "(unknown)";
-                       ccnt = scnprintf(buf + tcnt,
-                                        acnt - tcnt,
-                                        " %s (%u)", p, id);
+                       if (p) {
+                               ccnt = scnprintf(buf + tcnt,
+                                                acnt - tcnt,
+                                                " %s", p);
+                       } else {
+                               ccnt = scnprintf(buf + tcnt,
+                                                acnt - tcnt,
+                                                " (unknown id=%u)", id);
+                       }
+                       tcnt += ccnt;
                }
                return tcnt;
        }