diff options
author | Mike Isely <isely@pobox.com> | 2009-03-06 21:28:28 -0600 |
---|---|---|
committer | Mike Isely <isely@pobox.com> | 2009-03-06 21:28:28 -0600 |
commit | 778ae30db1fe43b100612fadbd15cf51e9bb630b (patch) | |
tree | afb3b2706603724d93d16bd98d8b7122d9804bdb /linux/drivers/media | |
parent | 62a5d8ccb027ef29425a3a1df6f47777b229d305 (diff) | |
download | mediapointer-dvb-s2-778ae30db1fe43b100612fadbd15cf51e9bb630b.tar.gz mediapointer-dvb-s2-778ae30db1fe43b100612fadbd15cf51e9bb630b.tar.bz2 |
pvrusb2: Implement reporting of connected sub-devices
From: Mike Isely <isely@pobox.com>
The pvrusb2 driver has a function that reports internal state. It can
be accessed from either the debug interface or as the result of a v4l
log status request. This change adds information listing sub-devices
to the report.
Priority: normal
Signed-off-by: Mike Isely <isely@pobox.com>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 75aea30c3..96a9729e6 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c @@ -4875,6 +4875,29 @@ static unsigned int pvr2_hdw_report_unlocked(struct pvr2_hdw *hdw,int which, stats.buffers_processed, stats.buffers_failed); } + case 6: { + struct v4l2_subdev *sd; + unsigned int tcnt = 0; + unsigned int ccnt; + const char *p; + unsigned int id; + ccnt = scnprintf(buf, + acnt, + "Associted v4l2_subdev drivers:"); + tcnt += ccnt; + v4l2_device_for_each_subdev(sd, &hdw->v4l2_dev) { + id = sd->grp_id; + p = NULL; + if (id < ARRAY_SIZE(module_names)) { + p = module_names[id]; + } + if (!p) p = "(unknown)"; + ccnt = scnprintf(buf + tcnt, + acnt - tcnt, + " %s (%u)", p, id); + } + return tcnt; + } default: break; } return 0; |