diff options
author | Mike Isely <isely@pobox.com> | 2009-03-06 23:42:40 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 11:43:37 -0400 |
commit | 0db8556805bdaed865329e55b9a1ad05f9cbd856 (patch) | |
tree | e6722d519e82d7b9e506022013c44da12b88b5c7 /drivers/media/video/pvrusb2 | |
parent | 5f757ddd5f193f54a5a7498d32568b630583503e (diff) |
V4L/DVB (11187): pvrusb2: Allow sub-devices to insert correctly
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>
Diffstat (limited to 'drivers/media/video/pvrusb2')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index b10b90d97578..e61e34821fd6 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c | |||
@@ -2045,6 +2045,7 @@ static int pvr2_hdw_load_subdev(struct pvr2_hdw *hdw, | |||
2045 | * and every other place where I can find examples of this, the | 2045 | * and every other place where I can find examples of this, the |
2046 | * "chipid" appears to just be the module name again. So here we | 2046 | * "chipid" appears to just be the module name again. So here we |
2047 | * just do the same thing. */ | 2047 | * just do the same thing. */ |
2048 | hdw->i2c_adap.class = 0; | ||
2048 | if (i2ccnt == 1) { | 2049 | if (i2ccnt == 1) { |
2049 | pvr2_trace(PVR2_TRACE_INIT, | 2050 | pvr2_trace(PVR2_TRACE_INIT, |
2050 | "Module ID %u:" | 2051 | "Module ID %u:" |
@@ -2062,6 +2063,7 @@ static int pvr2_hdw_load_subdev(struct pvr2_hdw *hdw, | |||
2062 | fname, fname, | 2063 | fname, fname, |
2063 | i2caddr); | 2064 | i2caddr); |
2064 | } | 2065 | } |
2066 | hdw->i2c_adap.class = I2C_CLASS_TV_ANALOG; | ||
2065 | 2067 | ||
2066 | if (!sd) { | 2068 | if (!sd) { |
2067 | pvr2_trace(PVR2_TRACE_ERROR_LEGS, | 2069 | pvr2_trace(PVR2_TRACE_ERROR_LEGS, |