aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pvrusb2/pvrusb2-hdw.c
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2009-03-06 22:28:28 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:43:35 -0400
commit858f910e869d1300c1ab0cadbe9908322f8bfb78 (patch)
treed59266af0b4e5ad586c91a37faa49903cb876c73 /drivers/media/video/pvrusb2/pvrusb2-hdw.c
parent20ae26c84e48b95177e334fa9022f68aa3b77df6 (diff)
V4L/DVB (11174): pvrusb2: Implement reporting of connected sub-devices
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. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-hdw.c')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-hdw.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index 2f9667e62bb1..bd4e374e37f8 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -4779,6 +4779,29 @@ static unsigned int pvr2_hdw_report_unlocked(struct pvr2_hdw *hdw,int which,
4779 stats.buffers_processed, 4779 stats.buffers_processed,
4780 stats.buffers_failed); 4780 stats.buffers_failed);
4781 } 4781 }
4782 case 6: {
4783 struct v4l2_subdev *sd;
4784 unsigned int tcnt = 0;
4785 unsigned int ccnt;
4786 const char *p;
4787 unsigned int id;
4788 ccnt = scnprintf(buf,
4789 acnt,
4790 "Associted v4l2_subdev drivers:");
4791 tcnt += ccnt;
4792 v4l2_device_for_each_subdev(sd, &hdw->v4l2_dev) {
4793 id = sd->grp_id;
4794 p = NULL;
4795 if (id < ARRAY_SIZE(module_names)) {
4796 p = module_names[id];
4797 }
4798 if (!p) p = "(unknown)";
4799 ccnt = scnprintf(buf + tcnt,
4800 acnt - tcnt,
4801 " %s (%u)", p, id);
4802 }
4803 return tcnt;
4804 }
4782 default: break; 4805 default: break;
4783 } 4806 }
4784 return 0; 4807 return 0;