From: Hans Verkuil Date: Thu, 21 Feb 2019 13:22:41 +0000 (-0500) Subject: media: media-devnode: fill in media chardev kobject to ease debugging X-Git-Tag: v5.4-rc1~956^2~232 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=13deaec42578fb4da844b0c81d13a88b59fdae65;p=platform%2Fkernel%2Flinux-rpi.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 Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/media-devnode.c b/drivers/media/media-devnode.c index 6b87a72..61dc05f 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);