From: Mike Isely Date: Sat, 7 Mar 2009 04:39:40 +0000 (-0300) Subject: V4L/DVB (11186): pvrusb2: Fix bugs involved in listing of sub-devices X-Git-Tag: 2.1b_release~13690^2~105 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5f757ddd5f193f54a5a7498d32568b630583503e;p=platform%2Fkernel%2Fkernel-mfld-blackbay.git V4L/DVB (11186): pvrusb2: Fix bugs involved in listing of sub-devices Signed-off-by: Mike Isely Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 937c85c..b10b90d 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; }