Skip to content

Commit

Permalink
V4L/DVB (11186): pvrusb2: Fix bugs involved in listing of sub-devices
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mike Isely authored and Mauro Carvalho Chehab committed Mar 30, 2009
1 parent 3ab8d29 commit 5f757dd
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions drivers/media/video/pvrusb2/pvrusb2-hdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -4855,18 +4855,24 @@ static unsigned int pvr2_hdw_report_unlocked(struct pvr2_hdw *hdw,int which,
unsigned int id;
ccnt = scnprintf(buf,
acnt,
"Associted v4l2_subdev drivers:");
"Associated 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);
if (p) {
ccnt = scnprintf(buf + tcnt,
acnt - tcnt,
" %s", p);
} else {
ccnt = scnprintf(buf + tcnt,
acnt - tcnt,
" (unknown id=%u)", id);
}
tcnt += ccnt;
}
return tcnt;
}
Expand Down

0 comments on commit 5f757dd

Please sign in to comment.