All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@kernel.org>
To: unlisted-recipients:; (no To-header on input)
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-kernel@vger.kernel.org, linux-media@vger.kernel.org
Subject: [PATCH 10/26] media: digitv: use the newer dvb-usb macros for USB device
Date: Mon, 28 Mar 2022 22:41:22 +0200	[thread overview]
Message-ID: <68de8820a361e61c25bf7402acac71b3770ff906.1648499509.git.mchehab@kernel.org> (raw)
In-Reply-To: <cover.1648499509.git.mchehab@kernel.org>

In order to make the drivers under dvb-usb more homogeneous,
use the new macro.

Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---

To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover.
See [PATCH 00/26] at: https://lore.kernel.org/all/cover.1648499509.git.mchehab@kernel.org/

 drivers/media/usb/dvb-usb/digitv.c | 13 +++++++++----
 include/media/dvb-usb-ids.h        |  2 +-
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/media/usb/dvb-usb/digitv.c b/drivers/media/usb/dvb-usb/digitv.c
index 4e3b3c064bcf..2756815a780b 100644
--- a/drivers/media/usb/dvb-usb/digitv.c
+++ b/drivers/media/usb/dvb-usb/digitv.c
@@ -291,10 +291,15 @@ static int digitv_probe(struct usb_interface *intf,
 	return ret;
 }
 
-static struct usb_device_id digitv_table [] = {
-		{ USB_DEVICE(USB_VID_ANCHOR, USB_PID_NEBULA_DIGITV) },
-		{ }		/* Terminating entry */
+enum {
+	ANCHOR_NEBULA_DIGITV,
 };
+
+static struct usb_device_id digitv_table[] = {
+	DVB_USB_DEV(ANCHOR, ANCHOR_NEBULA_DIGITV),
+	{ }
+};
+
 MODULE_DEVICE_TABLE (usb, digitv_table);
 
 static struct dvb_usb_device_properties digitv_properties = {
@@ -343,7 +348,7 @@ static struct dvb_usb_device_properties digitv_properties = {
 	.num_device_descs = 1,
 	.devices = {
 		{   "Nebula Electronics uDigiTV DVB-T USB2.0)",
-			{ &digitv_table[0], NULL },
+			{ &digitv_table[ANCHOR_NEBULA_DIGITV], NULL },
 			{ NULL },
 		},
 		{ NULL },
diff --git a/include/media/dvb-usb-ids.h b/include/media/dvb-usb-ids.h
index 5ae55c20912e..c3bea2bf9dda 100644
--- a/include/media/dvb-usb-ids.h
+++ b/include/media/dvb-usb-ids.h
@@ -104,6 +104,7 @@
 #define USB_PID_AFATECH_AF9035_9035			0x9035
 #define USB_PID_ALINK_DTU				0xf170
 #define USB_PID_AME_DTV5100				0xa232
+#define USB_PID_ANCHOR_NEBULA_DIGITV			0x0201
 #define USB_PID_ANSONIC_DVBT_USB			0x6000
 #define USB_PID_ANYSEE					0x861f
 #define USB_PID_ARTEC_T14BR				0x810f
@@ -301,7 +302,6 @@
 #define USB_PID_MYGICA_T230C2				0xc68a
 #define USB_PID_MYGICA_T230C2_LITE			0xc69a
 #define USB_PID_MYGICA_T230C_LITE			0xc699
-#define USB_PID_NEBULA_DIGITV				0x0201
 #define USB_PID_NOXON_DAB_STICK 			0x00b3
 #define USB_PID_NOXON_DAB_STICK_REV2			0x00e0
 #define USB_PID_NOXON_DAB_STICK_REV3			0x00b4
-- 
2.35.1


  parent reply	other threads:[~2022-03-28 20:45 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-28 20:41 [PATCH 00/26] dvb-usb: use designated initializers Mauro Carvalho Chehab
2022-03-28 20:41 ` [PATCH 01/26] media: dvb-usb-ids.h: sort entries Mauro Carvalho Chehab
2022-03-28 20:41 ` [PATCH 02/26] media: dvb-usb: move USB IDs to dvb-usb-ids.h Mauro Carvalho Chehab
2022-03-28 20:41 ` [PATCH 03/26] media: dvb-usb: vp702x: reference to usb ID table Mauro Carvalho Chehab
2022-03-28 20:41 ` [PATCH 04/26] media: dvb-usb: Add helper macros for using USB VID/PID Mauro Carvalho Chehab
2022-03-28 20:41 ` [PATCH 05/26] media: dvb-usb: a800: use an enum for the device number Mauro Carvalho Chehab
2022-03-28 20:41 ` [PATCH 06/26] media: af9005: use the newer dvb-usb macros for USB device Mauro Carvalho Chehab
2022-03-28 20:41 ` [PATCH 07/26] media: dvb-usb: az6027: use an enum for the device number Mauro Carvalho Chehab
2022-03-28 20:41 ` [PATCH 08/26] media: cinergyT2-core: use the newer dvb-usb macros for USB device Mauro Carvalho Chehab
2022-03-28 20:41 ` [PATCH 09/26] media: cxusb: " Mauro Carvalho Chehab
2022-03-28 20:41 ` Mauro Carvalho Chehab [this message]
2022-03-28 20:41 ` [PATCH 11/26] media: dvb-usb: dtt200u: use an enum for the device number Mauro Carvalho Chehab
2022-03-28 20:41 ` [PATCH 12/26] media: dtv5100: use the newer dvb-usb macros for USB device Mauro Carvalho Chehab
2022-03-28 20:41 ` [PATCH 13/26] media: dw2102: " Mauro Carvalho Chehab
2022-03-28 20:41 ` [PATCH 14/26] media: dvb-usb: gp8psk: use an enum for the device number Mauro Carvalho Chehab
2022-03-28 20:41 ` [PATCH 15/26] media: dvb-usb: m920x: " Mauro Carvalho Chehab
2022-03-28 20:41 ` [PATCH 16/26] media: dvb-usb: nova-t-usb2: " Mauro Carvalho Chehab
2022-03-28 20:41 ` [PATCH 17/26] media: dvb-usb: opera1: " Mauro Carvalho Chehab
2022-03-28 20:41 ` [PATCH 18/26] media: dvb-usb: pctv452e: " Mauro Carvalho Chehab
2022-03-28 20:41 ` [PATCH 19/26] media: technisat-usb2: use the newer dvb-usb macros for USB device Mauro Carvalho Chehab
2022-03-28 20:41 ` [PATCH 20/26] media: dvb-usb: ttusb2: use an enum for the device number Mauro Carvalho Chehab
2022-03-28 20:41 ` [PATCH 21/26] media: dvb-usb: umt-010: " Mauro Carvalho Chehab
2022-03-28 20:41 ` [PATCH 22/26] media: dvb-usb: vp702x: " Mauro Carvalho Chehab
2022-03-28 20:41 ` [PATCH 23/26] media: dvb-usb: vp7045: " Mauro Carvalho Chehab
2022-03-28 20:41 ` [PATCH 24/26] media: dvb-usb: dibusb-mb: " Mauro Carvalho Chehab
2022-03-28 20:41 ` [PATCH 25/26] media: dvb-usb: dibusb-mc: " Mauro Carvalho Chehab
2022-03-28 20:41 ` [PATCH 26/26] media: dvb-usb: dib0700_devices: " Mauro Carvalho Chehab
2022-03-28 21:02 ` [PATCH 00/26] dvb-usb: use designated initializers Joe Perches

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=68de8820a361e61c25bf7402acac71b3770ff906.1648499509.git.mchehab@kernel.org \
    --to=mchehab@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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.