aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/pvrusb2
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2009-03-07 01:39:40 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 12:43:37 -0300
commit5f757ddd5f193f54a5a7498d32568b630583503e (patch)
tree4ed547715d790cdc25daed067e13a0876f30aa13 /drivers/media/video/pvrusb2
parent3ab8d295156a43fc2751483d2f82a63c97489f89 (diff)
V4L/DVB (11186): pvrusb2: Fix bugs involved in listing of sub-devices
Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/pvrusb2')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-hdw.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index 937c85c5c03..b10b90d9757 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -4855,7 +4855,7 @@ 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;
@@ -4863,10 +4863,16 @@ static unsigned int pvr2_hdw_report_unlocked(struct pvr2_hdw *hdw,int which,
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;
}