Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
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;
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;
}