diff options
author | Mike Isely <isely@pobox.com> | 2009-03-06 20:58:15 -0600 |
---|---|---|
committer | Mike Isely <isely@pobox.com> | 2009-03-06 20:58:15 -0600 |
commit | fda8259d29b321bcacec067d25f37655942503d3 (patch) | |
tree | 8f6d3ee7733d35ce29bc55810e8bd5ec19ef186d /linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c | |
parent | 2fda0e83cd23f41e475d8170f9dfbc67a4ffa249 (diff) | |
download | mediapointer-dvb-s2-fda8259d29b321bcacec067d25f37655942503d3.tar.gz mediapointer-dvb-s2-fda8259d29b321bcacec067d25f37655942503d3.tar.bz2 |
pvrusb2: Tie up loose ends with v4l2-subdev setup
From: Mike Isely <isely@pobox.com>
Tie up loose ends with v4l2-subdev setup. Set attached module's group
ID to match our internal ID, emit a few useful messages when
sub-devices are dealt with, implement better error legs, and fix an
error in the old i2c layer (caused by changes related to the
v4l2-subdev work here).
Priority: normal
Signed-off-by: Mike Isely <isely@pobox.com>
Diffstat (limited to 'linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c')
-rw-r--r-- | linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 605e47368..66c9a99ad 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c @@ -2037,17 +2037,26 @@ static void pvr2_hdw_load_subdev(struct pvr2_hdw *hdw, i2caddr); } + if (!sd) { + pvr2_trace(PVR2_TRACE_ERROR_LEGS, + "Module ID %u for device %s failed to load" + " (this is probably a bad thing...)", + mid, hdw->hdw_desc->description); + return; + } + + /* Tag this sub-device instance with the module ID we know about. + In other places we'll use that tag to determine if the instance + requires special handling. */ + sd->grp_id = mid; + /* If we have both old and new i2c layers enabled, make sure that old layer isn't also tracking this module. This is a debugging aid, in normal situations there's no reason for both mechanisms to be enabled. */ pvr2_i2c_untrack_subdev(hdw, sd); + pvr2_trace(PVR2_TRACE_INIT, "Attached sub-driver %s", fname); - // ????? - /* Based on module ID, we should remember subdev pointers - so that we can send certain custom commands where - needed. */ - // ????? } |