All of lore.kernel.org
 help / color / mirror / Atom feed
From: hverkuil-cisco@xs4all.nl
To: linux-media@vger.kernel.org
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Helen Koike <helen.koike@collabora.com>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>
Subject: [PATCHv3 2/9] media-devnode: fill in media chardev kobject to ease debugging
Date: Thu,  7 Mar 2019 10:29:54 +0100	[thread overview]
Message-ID: <20190307093001.30435-3-hverkuil-cisco@xs4all.nl> (raw)
In-Reply-To: <20190307093001.30435-1-hverkuil-cisco@xs4all.nl>

From: Hans Verkuil <hverkuil-cisco@xs4all.nl>

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);
-- 
2.20.1


  parent reply	other threads:[~2019-03-07  9:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-07  9:29 [PATCHv3 0/9] Various core and virtual driver fixes hverkuil-cisco
2019-03-07  9:29 ` [PATCHv3 1/9] cec: fill in cec chardev kobject to ease debugging hverkuil-cisco
2019-03-07  9:29 ` hverkuil-cisco [this message]
2019-03-07  9:29 ` [PATCHv3 3/9] vivid: use vzalloc for dev->bitmap_out hverkuil-cisco
2019-03-07  9:29 ` [PATCHv3 4/9] media-entity: set ent_enum->bmap to NULL after freeing it hverkuil-cisco
2019-03-07  9:29 ` [PATCHv3 5/9] vim2m: replace devm_kzalloc by kzalloc hverkuil-cisco
2019-03-07  9:29 ` [PATCHv3 6/9] v4l2-subdev: add release() internal op hverkuil-cisco
2019-03-07  9:29 ` [PATCHv3 7/9] v4l2-subdev: handle module refcounting here hverkuil-cisco
2019-03-07  9:30 ` [PATCHv3 8/9] vimc: free vimc_cap_device when the last user disappears hverkuil-cisco
2019-03-07  9:30 ` [PATCHv3 9/9] vimc: use new release op hverkuil-cisco

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190307093001.30435-3-hverkuil-cisco@xs4all.nl \
    --to=hverkuil-cisco@xs4all.nl \
    --cc=helen.koike@collabora.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.