summaryrefslogtreecommitdiffstats
path: root/drivers/media/media-devnode.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2019-02-21 14:22:41 +0100
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-03-19 18:21:16 +0100
commit13deaec42578fb4da844b0c81d13a88b59fdae65 (patch)
tree89eabc86a060e0736dfae926cab060d9a5a467ef /drivers/media/media-devnode.c
parentmedia: cec: fill in cec chardev kobject to ease debugging (diff)
downloadlinux-13deaec42578fb4da844b0c81d13a88b59fdae65.tar.xz
linux-13deaec42578fb4da844b0c81d13a88b59fdae65.zip
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/media-devnode.c')
-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);