Message ID | 20190221142148.3412-3-hverkuil-cisco@xs4all.nl (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Various core and virtual driver fixes | expand |
Hi Hans, Thank you for the patch. On Thu, Feb 21, 2019 at 03:21:43PM +0100, Hans Verkuil wrote: > 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> > --- > drivers/media/media-devnode.c | 1 + > 1 file changed, 1 insertion(+) > > 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);
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);
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> --- drivers/media/media-devnode.c | 1 + 1 file changed, 1 insertion(+)