diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2009-11-27 11:56:50 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-12-15 21:17:54 -0500 |
commit | eac8ea536aded07004bde917f05a2329902c64b0 (patch) | |
tree | d083c2aee98e068e27ad4884dc905266709edfe8 /drivers/media/video/v4l2-dev.c | |
parent | a3a9e287daa1f299e318161b790b1c5902b1d869 (diff) |
V4L/DVB (13549): v4l: Add video_device_node_name function
Many drivers access the device number (video_device::v4l2_devnode::num)
in order to print the video device node name. Add and use a helper
function to retrieve the video_device node name.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/v4l2-dev.c')
-rw-r--r-- | drivers/media/video/v4l2-dev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c index 500cbe9891ac..aa3e0f9aa3bf 100644 --- a/drivers/media/video/v4l2-dev.c +++ b/drivers/media/video/v4l2-dev.c | |||
@@ -551,8 +551,8 @@ static int __video_register_device(struct video_device *vdev, int type, int nr, | |||
551 | vdev->dev.release = v4l2_device_release; | 551 | vdev->dev.release = v4l2_device_release; |
552 | 552 | ||
553 | if (nr != -1 && nr != vdev->num && warn_if_nr_in_use) | 553 | if (nr != -1 && nr != vdev->num && warn_if_nr_in_use) |
554 | printk(KERN_WARNING "%s: requested %s%d, got %s%d\n", | 554 | printk(KERN_WARNING "%s: requested %s%d, got %s\n", __func__, |
555 | __func__, name_base, nr, name_base, vdev->num); | 555 | name_base, nr, video_device_node_name(vdev)); |
556 | 556 | ||
557 | /* Part 5: Activate this minor. The char device can now be used. */ | 557 | /* Part 5: Activate this minor. The char device can now be used. */ |
558 | mutex_lock(&videodev_lock); | 558 | mutex_lock(&videodev_lock); |