mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 19:56:18 +00:00
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>
This commit is contained in:
parent
20ae26c84e
commit
858f910e86
1 changed files with 23 additions and 0 deletions
|
@ -4779,6 +4779,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;
|
||||
|
|
Loading…
Reference in a new issue