summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2019-02-21 16:22:41 +0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-03-19 20:21:16 +0300
commit13deaec42578fb4da844b0c81d13a88b59fdae65 (patch)
tree89eabc86a060e0736dfae926cab060d9a5a467ef /drivers/media
parent7dfccff14f57c65f6ae4c49aea8eb5f7bf39a840 (diff)
downloadlinux-13deaec42578fb4da844b0c81d13a88b59fdae65.tar.xz
media: media-devnode: fill in media chardev kobject to ease debugging
The media chardev kobject has no name, which made it hard to debug when kobject debugging is turned on. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/media-devnode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/media-devnode.c b/drivers/media/media-devnode.c
index 6b87a721dc49..61dc05fcc55c 100644
--- a/drivers/media/media-devnode.c
+++ b/drivers/media/media-devnode.c
@@ -251,6 +251,7 @@ int __must_check media_devnode_register(struct media_device *mdev,
/* Part 2: Initialize the character device */
cdev_init(&devnode->cdev, &media_devnode_fops);
devnode->cdev.owner = owner;
+ kobject_set_name(&devnode->cdev.kobj, "media%d", devnode->minor);
/* Part 3: Add the media and char device */
ret = cdev_device_add(&devnode->cdev, &devnode->dev);