All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ezequiel Garcia <ezequiel@collabora.com>
To: linux-media@vger.kernel.org
Cc: Hans Verkuil <hverkuil@xs4all.nl>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	cphealy@gmail.com, Benjamin.Bara@skidata.com,
	l.stach@pengutronix.de, Ezequiel Garcia <ezequiel@collabora.com>,
	kernel@collabora.com
Subject: [PATCH v2 3/6] coda: Clarify device registered log
Date: Wed,  7 Oct 2020 07:35:41 -0300	[thread overview]
Message-ID: <20201007103544.22807-4-ezequiel@collabora.com> (raw)
In-Reply-To: <20201007103544.22807-1-ezequiel@collabora.com>

Instead of printing just the device type, let's use
the device name, which makes the message more useful.

With this commit, the messages shown when the driver
is registered are:

coda 2040000.vpu: Firmware code revision: 570363
coda 2040000.vpu: Initialized CODA960.
coda 2040000.vpu: Firmware version: 3.1.1
coda 2040000.vpu: coda-jpeg-encoder registered as video0
coda 2040000.vpu: coda-jpeg-decoder registered as video1
coda 2040000.vpu: coda-video-encoder registered as video2
coda 2040000.vpu: coda-video-decoder registered as video3

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
---
 drivers/media/platform/coda/coda-common.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
index 87a2c706f747..a72ea4bb37d7 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -172,7 +172,7 @@ struct coda_video_device {
 };
 
 static const struct coda_video_device coda_bit_encoder = {
-	.name = "coda-encoder",
+	.name = "coda-video-encoder",
 	.type = CODA_INST_ENCODER,
 	.ops = &coda_bit_encode_ops,
 	.src_formats = {
@@ -202,7 +202,7 @@ static const struct coda_video_device coda_bit_jpeg_encoder = {
 };
 
 static const struct coda_video_device coda_bit_decoder = {
-	.name = "coda-decoder",
+	.name = "coda-video-decoder",
 	.type = CODA_INST_DECODER,
 	.ops = &coda_bit_decode_ops,
 	.src_formats = {
@@ -2851,12 +2851,12 @@ static int coda_hw_init(struct coda_dev *dev)
 static int coda_register_device(struct coda_dev *dev, int i)
 {
 	struct video_device *vfd = &dev->vfd[i];
-	enum coda_inst_type type;
+	const char *name;
 	int ret;
 
 	if (i >= dev->devtype->num_vdevs)
 		return -EINVAL;
-	type = dev->devtype->vdevs[i]->type;
+	name = dev->devtype->vdevs[i]->name;
 
 	strscpy(vfd->name, dev->devtype->vdevs[i]->name, sizeof(vfd->name));
 	vfd->fops	= &coda_fops;
@@ -2876,8 +2876,7 @@ static int coda_register_device(struct coda_dev *dev, int i)
 	ret = video_register_device(vfd, VFL_TYPE_VIDEO, 0);
 	if (!ret)
 		v4l2_info(&dev->v4l2_dev, "%s registered as %s\n",
-			  type == CODA_INST_ENCODER ? "encoder" : "decoder",
-			  video_device_node_name(vfd));
+			  name, video_device_node_name(vfd));
 	return ret;
 }
 
-- 
2.27.0


  parent reply	other threads:[~2020-10-07 10:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-07 10:35 [PATCH v2 0/6] CODA timeout fix & assorted changes Ezequiel Garcia
2020-10-07 10:35 ` [PATCH v2 1/6] coda: Remove redundant ctx->initialized setting Ezequiel Garcia
2020-10-07 10:35 ` [PATCH v2 2/6] coda: Simplify H.264 small buffer padding logic Ezequiel Garcia
2020-10-07 10:35 ` Ezequiel Garcia [this message]
2020-10-07 10:35 ` [PATCH v2 4/6] coda: Clarify interrupt registered name Ezequiel Garcia
2020-10-07 10:35 ` [PATCH v2 5/6] coda: coda_buffer_meta housekeeping fix Ezequiel Garcia
2020-10-07 10:35 ` [PATCH v2 6/6] coda: Add a V4L2 user for control error macroblocks count Ezequiel Garcia
2020-10-30 12:14   ` Hans Verkuil
2020-10-07 11:13 ` [PATCH v2 0/6] CODA timeout fix & assorted changes Fabio Estevam
2020-10-07 11:34   ` Ezequiel Garcia
2020-10-12 13:06     ` Fabio Estevam
2020-10-12 14:47       ` Benjamin Bara - SKIDATA
2020-11-04 17:00         ` Ezequiel Garcia
2020-11-04 17:49           ` Benjamin Bara - SKIDATA
2020-11-26 23:41             ` Ezequiel Garcia

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=20201007103544.22807-4-ezequiel@collabora.com \
    --to=ezequiel@collabora.com \
    --cc=Benjamin.Bara@skidata.com \
    --cc=cphealy@gmail.com \
    --cc=hverkuil@xs4all.nl \
    --cc=kernel@collabora.com \
    --cc=l.stach@pengutronix.de \
    --cc=linux-media@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    /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.