Message ID | 20190221142148.3412-2-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:42PM +0100, Hans Verkuil wrote: > The cec 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/cec/cec-core.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/media/cec/cec-core.c b/drivers/media/cec/cec-core.c > index cc875dabd765..f5d1578e256a 100644 > --- a/drivers/media/cec/cec-core.c > +++ b/drivers/media/cec/cec-core.c > @@ -126,6 +126,7 @@ static int __must_check cec_devnode_register(struct cec_devnode *devnode, > /* Part 2: Initialize and register the character device */ > cdev_init(&devnode->cdev, &cec_devnode_fops); > devnode->cdev.owner = owner; > + kobject_set_name(&devnode->cdev.kobj, "cec%d", devnode->minor); > > ret = cdev_device_add(&devnode->cdev, &devnode->dev); > if (ret) {
diff --git a/drivers/media/cec/cec-core.c b/drivers/media/cec/cec-core.c index cc875dabd765..f5d1578e256a 100644 --- a/drivers/media/cec/cec-core.c +++ b/drivers/media/cec/cec-core.c @@ -126,6 +126,7 @@ static int __must_check cec_devnode_register(struct cec_devnode *devnode, /* Part 2: Initialize and register the character device */ cdev_init(&devnode->cdev, &cec_devnode_fops); devnode->cdev.owner = owner; + kobject_set_name(&devnode->cdev.kobj, "cec%d", devnode->minor); ret = cdev_device_add(&devnode->cdev, &devnode->dev); if (ret) {
The cec 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/cec/cec-core.c | 1 + 1 file changed, 1 insertion(+)