summaryrefslogtreecommitdiffstats
path: root/drivers/media/v4l2-core
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-04-06 06:06:13 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-04-14 19:46:49 -0300
commit0f0fe4b9f6f32b90c82345b97da2977b84e14414 (patch)
treedb645e61e54d5ce9838cf65f4a99a3fd43d1e78c /drivers/media/v4l2-core
parent3eef25107cab65a1158b11ba373fb9b4fc25b4b8 (diff)
downloadblackbird-obmc-linux-0f0fe4b9f6f32b90c82345b97da2977b84e14414.tar.gz
blackbird-obmc-linux-0f0fe4b9f6f32b90c82345b97da2977b84e14414.zip
[media] v4l2-ioctl: fill in name before calling vidioc_g_chip_name
That way drivers do not need to fill in the name themselves for bridge address 0. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/v4l2-core')
-rw-r--r--drivers/media/v4l2-core/v4l2-ioctl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
index 7a96162f544f..c48d0acd8bb9 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -1869,16 +1869,16 @@ static int v4l_dbg_g_chip_name(const struct v4l2_ioctl_ops *ops,
p->flags |= V4L2_CHIP_FL_WRITABLE;
if (ops->vidioc_g_register)
p->flags |= V4L2_CHIP_FL_READABLE;
- if (ops->vidioc_g_chip_name)
- return ops->vidioc_g_chip_name(file, fh, arg);
- if (p->match.addr)
- return -EINVAL;
if (vfd->v4l2_dev)
strlcpy(p->name, vfd->v4l2_dev->name, sizeof(p->name));
else if (vfd->parent)
strlcpy(p->name, vfd->parent->driver->name, sizeof(p->name));
else
strlcpy(p->name, "bridge", sizeof(p->name));
+ if (ops->vidioc_g_chip_name)
+ return ops->vidioc_g_chip_name(file, fh, arg);
+ if (p->match.addr)
+ return -EINVAL;
return 0;
case V4L2_CHIP_MATCH_SUBDEV:
OpenPOWER on IntegriCloud