summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2009-03-06 22:39:40 -0600
committerMike Isely <isely@pobox.com>2009-03-06 22:39:40 -0600
commit0f62cc7a5dbd33059d58e9e944c6af741dcc0ce6 (patch)
treeac073ee0cb69b60bf8a7aa19348ab5d1da295c97 /linux/drivers/media/video
parent98489577d3b3394896046026d693d350abf659c5 (diff)
downloadmediapointer-dvb-s2-0f62cc7a5dbd33059d58e9e944c6af741dcc0ce6.tar.gz
mediapointer-dvb-s2-0f62cc7a5dbd33059d58e9e944c6af741dcc0ce6.tar.bz2
pvrusb2: Fix bugs involved in listing of sub-devices
From: Mike Isely <isely@pobox.com> Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index e6411e2c4..8ac5b9f11 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -4951,7 +4951,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;
@@ -4959,10 +4959,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;
}