mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
7dfccff14f
commit
13deaec425
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue