Skip to content

Commit

Permalink
V4L/DVB (11187): pvrusb2: Allow sub-devices to insert correctly
Browse files Browse the repository at this point in the history
A sub-device won't successfully attach to our I2C adapter if its class
isn't set to zero.  Right the class is still set to
I2C_CLASS_TV_ANALOG in order to allow the old mechanism to still
work.  This change temporarily sets the class to zero during the
interval when the sub-device attaches.  This code will get removed
when the old i2c layer is finally removed from the driver.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mike Isely authored and Mauro Carvalho Chehab committed Mar 30, 2009
1 parent 5f757dd commit 0db8556
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/media/video/pvrusb2/pvrusb2-hdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:"
Expand All @@ -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,
Expand Down

0 comments on commit 0db8556

Please sign in to comment.