mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-09 16:12:21 +00:00
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>
This commit is contained in:
parent
a3a9e287da
commit
eac8ea536a
3 changed files with 21 additions and 4 deletions
|
@ -141,6 +141,11 @@ static inline void *video_drvdata(struct file *file)
|
|||
return video_get_drvdata(video_devdata(file));
|
||||
}
|
||||
|
||||
static inline const char *video_device_node_name(struct video_device *vdev)
|
||||
{
|
||||
return dev_name(&vdev->dev);
|
||||
}
|
||||
|
||||
static inline int video_is_unregistered(struct video_device *vdev)
|
||||
{
|
||||
return test_bit(V4L2_FL_UNREGISTERED, &vdev->flags);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue