Message ID | 973f454413c31ba5b6464c289ee24b01465abaff.1708422122.git.mchehab@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-72734-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp292338dyc; Tue, 20 Feb 2024 01:51:06 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUgSlhAWgj4B3NMqRGXT4Pz2NL650Bv0YWT4Usy2OaI6R6Qh7tmhcRXyWhCU8FxamwpQzV9veJJz92t+nMB2HA/lQHYfw== X-Google-Smtp-Source: AGHT+IFOCciw/DP/CtygGu00LjtC7tdmLWo0ZRfLS/Mq5wcRI4RWJ18s6o5KCQA/lBAUXiUdvCCV X-Received: by 2002:a05:6808:190e:b0:3c0:3bd9:136 with SMTP id bf14-20020a056808190e00b003c03bd90136mr19564977oib.24.1708422666676; Tue, 20 Feb 2024 01:51:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708422666; cv=pass; d=google.com; s=arc-20160816; b=mnXVSohmgkpGi/aEbk98Im/q2f4ZROiSdwFm6US12JFSFzUhsMOqRkb41ss31WhZxH X9CA2qwszvszMzlr0PYO2ZaaDwLXBzf4PRItQV+aEx5fTBF+UPFKQvaO0LRkCF5flc4L VblcysrHUk0jz71TaKSFEqbUIQ++3OLyKf2LngndWZQstDCzOC+Apr4XgjdqusbIrGgq l1BHoNwcnMUzly+jrYom9VisrRUSO4R+JvBGUddOUNYiO6UosZp8NHnPPq98OJc1ph7N 6H3GkB9R9BOIyQ/noS18qyg1Ae69c7AK34BJDz8MjQwCSrF8xLnwRa2BPtKBr3HNRgyL 9xDg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=8WKwAx8158d9hbBmFFwjk7Z+vLX7ZKelPlA7faRfUQ0=; fh=/cAvgwME2eOirL4KNPaTeXNgPCcXHVmkdPl/7K8ONqM=; b=w186iCVE+VrfwxOsQvx7GQIIbM4Pdw7tEJUpy54rdqsH89toNlZNm0u6O8p3c5FheD ufUVkONenK2SsJdBOJAnu4igoiVtwnCrRUBtHWz5ITfaRrN6MuuSzgSwiWFJaRyxGuSH VcI//FAE/gJ/Q1swclm0Tnom/xlH/W3Uuh53jVASqQRI1e4FLO2zkYHmXhEMkoOGFVq3 ahLC9jggItTVHCrTy2i2/Ev1WEpdwKTDk/M9VHmzZ+OSq9YY1WSW1cUvi7icAamwei9H SzsaTtckbOUDtk38yfylmKkdiTywd6MA/0CVhOd7G3Vn2Kn2ErqymlLwI61qbTNHaQYX aGAA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=P1Dcw7t4; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-72734-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72734-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id t13-20020aa78f8d000000b006e065264b32si5957932pfs.247.2024.02.20.01.51.06 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 01:51:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-72734-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=P1Dcw7t4; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-72734-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72734-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 9BF66287A1F for <ouuuleilei@gmail.com>; Tue, 20 Feb 2024 09:50:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EE90467C65; Tue, 20 Feb 2024 09:46:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="P1Dcw7t4" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 595B367A11; Tue, 20 Feb 2024 09:46:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708422389; cv=none; b=r46+PzR4OVNj5JSmOYamGAx4ui/Q/NjAj71N5RTtArb5OosDoMp05D0Vkp0UI/+nNym7CaR6EHVFYiqz9Pao1dyrWXfMl7paWCt1NzrJ14tK36zy+EhQkBklZDkZIgSM998LHcpuu8F5xfCft/ng4j7/1e+g/T3g9S3QILwblmE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708422389; c=relaxed/simple; bh=Ns5oGXdY8TXaX6JZCp10MJ9vOoAFV3yNi3j03gOThGE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fiAXmYn9UTYc0JNEEeKseGd46P6qYuiPG1tXdhb0RzpIdBfBjIr5FXUrd5wF/EdRHlixM6kcW84wcvbTJ1CMywr1VWHX9lQijbjq74gt+kA8GTQND1FVP9zos8yCCaftgQfw/27uNjy7Eym5VIMcMAxisnrr4b9l7IPtZDpARZ8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=P1Dcw7t4; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1FA7C433C7; Tue, 20 Feb 2024 09:46:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708422389; bh=Ns5oGXdY8TXaX6JZCp10MJ9vOoAFV3yNi3j03gOThGE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P1Dcw7t4kNIfM5xkQOU1U7UALwSd/pcfK2yGTigKVLaqUsV+Y21+djLFUFiOgCmFy y0Jnmmk4+y+q8DI/8Lz+XV2j8X/MfA4R5f8ZASu1wu5aQbXrd/LQxHs+bIUzbeyUZh JHC+o34NWlCjUZf0+QKWZGZWkEg7+CrmHORFdzCdyeR77NN69TcPYSHZF5AOsm30Kr cwlBFCZIMXus1wch9pE7RsFYW+Mmvid6VLiV8dJK1Nt+2LpQIZ9GQNWZOyet1dF2Uh EbyBq7BoeZPw+snyQljVeM8MFK6YkVw+iEQRBPp0/jNSZq6lV+0GW8vdcsMdNiNRSN PnS0lOPXyXtTQ== Received: from mchehab by mail.kernel.org with local (Exim 4.97.1) (envelope-from <mchehab@kernel.org>) id 1rcMhm-000000031Qv-2rQk; Tue, 20 Feb 2024 10:46:26 +0100 From: Mauro Carvalho Chehab <mchehab@kernel.org> To: Cc: Mauro Carvalho Chehab <mchehab@kernel.org>, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH 2/2] em28xx-dvb: fix DVB adapter device name Date: Tue, 20 Feb 2024 10:46:02 +0100 Message-ID: <973f454413c31ba5b6464c289ee24b01465abaff.1708422122.git.mchehab@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <cover.1708422122.git.mchehab@kernel.org> References: <cover.1708422122.git.mchehab@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791411005791703501 X-GMAIL-MSGID: 1791411005791703501 |
Series |
Add some uevent variables on DVB to support persistent names on udev
|
|
Commit Message
Mauro Carvalho Chehab
Feb. 20, 2024, 9:46 a.m. UTC
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(-)
Comments
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,
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, device, adapter_nr); if (result < 0) { dev_warn(&dev->intf->dev,