Commit 5f757ddd authored by Mike Isely's avatar Mike Isely Committed by Mauro Carvalho Chehab

V4L/DVB (11186): pvrusb2: Fix bugs involved in listing of sub-devices

Signed-off-by: default avatarMike Isely <isely@pobox.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 3ab8d295
...@@ -4855,7 +4855,7 @@ static unsigned int pvr2_hdw_report_unlocked(struct pvr2_hdw *hdw,int which, ...@@ -4855,7 +4855,7 @@ static unsigned int pvr2_hdw_report_unlocked(struct pvr2_hdw *hdw,int which,
unsigned int id; unsigned int id;
ccnt = scnprintf(buf, ccnt = scnprintf(buf,
acnt, acnt,
"Associted v4l2_subdev drivers:"); "Associated v4l2_subdev drivers:");
tcnt += ccnt; tcnt += ccnt;
v4l2_device_for_each_subdev(sd, &hdw->v4l2_dev) { v4l2_device_for_each_subdev(sd, &hdw->v4l2_dev) {
id = sd->grp_id; id = sd->grp_id;
...@@ -4863,10 +4863,16 @@ static unsigned int pvr2_hdw_report_unlocked(struct pvr2_hdw *hdw,int which, ...@@ -4863,10 +4863,16 @@ static unsigned int pvr2_hdw_report_unlocked(struct pvr2_hdw *hdw,int which,
if (id < ARRAY_SIZE(module_names)) { if (id < ARRAY_SIZE(module_names)) {
p = module_names[id]; p = module_names[id];
} }
if (!p) p = "(unknown)"; if (p) {
ccnt = scnprintf(buf + tcnt, ccnt = scnprintf(buf + tcnt,
acnt - tcnt, acnt - tcnt,
" %s (%u)", p, id); " %s", p);
} else {
ccnt = scnprintf(buf + tcnt,
acnt - tcnt,
" (unknown id=%u)", id);
}
tcnt += ccnt;
} }
return tcnt; return tcnt;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment