From: Hans Verkuil <hverkuil@xs4all.nl>
To: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org
Subject: Re: [PATCH 2/2] em28xx-dvb: fix DVB adapter device name
Date: Mon, 26 Feb 2024 10:03:18 +0100 [thread overview]
Message-ID: <c8fa257a-5259-4f4a-99dd-6a277899f6a6@xs4all.nl> (raw)
In-Reply-To: <973f454413c31ba5b6464c289ee24b01465abaff.1708422122.git.mchehab@kernel.org>
Hi Mauro,
On 20/02/2024 10:46, Mauro Carvalho Chehab wrote:
> This will be used for uevent, so it needs to be filled with the
> device name, and not with it's parent ID.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
> ---
> drivers/media/usb/em28xx/em28xx-dvb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c
> index 9fce59979e3b..759c04fbd8cf 100644
> --- a/drivers/media/usb/em28xx/em28xx-dvb.c
> +++ b/drivers/media/usb/em28xx/em28xx-dvb.c
> @@ -980,7 +980,7 @@ static int em28xx_register_dvb(struct em28xx_dvb *dvb, struct module *module,
>
> /* register adapter */
> result = dvb_register_adapter(&dvb->adapter,
> - dev_name(&dev->intf->dev), module,
> + em28xx_boards[dev->model].name, module,
It is not clear what the 'adapter name' should be: looking at how this is
used today it is either the name of the card or the name of the driver module
(KBUILD_MODNAME or a hardcoded string).
This driver appears to be the only one that uses dev_name, but I did not
do an exhaustive search, so there may be more.
In any case, I think this should be consistent and documented somewhere.
Personally, I think using the model/card name would be best.
But how does this relate to the name reported by FE_GET_INFO? Is it
supposed to be the same name? Is that handled correctly or documented
somewhere?
Regards,
Hans
> device, adapter_nr);
> if (result < 0) {
> dev_warn(&dev->intf->dev,
prev parent reply other threads:[~2024-02-26 9:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-20 9:46 [PATCH 0/2] Add some uevent variables on DVB to support persistent names on udev Mauro Carvalho Chehab
2024-02-20 9:46 ` [PATCH 1/2] media: dvbdev: export adapter's name and bus ID to DVB uevent variables Mauro Carvalho Chehab
2024-02-26 8:41 ` Hans Verkuil
2024-02-20 9:46 ` [PATCH 2/2] em28xx-dvb: fix DVB adapter device name Mauro Carvalho Chehab
2024-02-26 9:03 ` Hans Verkuil [this message]
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=c8fa257a-5259-4f4a-99dd-6a277899f6a6@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®