diff options
author | 2022-03-28 22:41:25 +0200 | |
---|---|---|
committer | 2022-04-18 07:36:43 +0200 | |
commit | 2fa2002f533e0ed847922cdf9479ea0875f4e49f (patch) | |
tree | 5960f50619e20be93dcd494df331f518b0201aa1 /drivers/media/usb | |
parent | media: dtv5100: use the newer dvb-usb macros for USB device (diff) | |
download | linux-2fa2002f533e0ed847922cdf9479ea0875f4e49f.tar.gz linux-2fa2002f533e0ed847922cdf9479ea0875f4e49f.tar.bz2 linux-2fa2002f533e0ed847922cdf9479ea0875f4e49f.zip |
media: dw2102: use the newer dvb-usb macros for USB device
In order to make the drivers under dvb-usb more homogeneous,
use the new macro, and rename some PIDs.
Link: https://lore.kernel.org/linux-media/828998ef3f0843bab4e84780e42f8f0802f57be7.1648499509.git.mchehab@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/usb')
-rw-r--r-- | drivers/media/usb/dvb-usb/dw2102.c | 84 |
1 files changed, 39 insertions, 45 deletions
diff --git a/drivers/media/usb/dvb-usb/dw2102.c b/drivers/media/usb/dvb-usb/dw2102.c index 33643fb88265..0ca764282c76 100644 --- a/drivers/media/usb/dvb-usb/dw2102.c +++ b/drivers/media/usb/dvb-usb/dw2102.c @@ -1771,10 +1771,10 @@ enum dw2102_table_entry { PROF_7500, GENIATECH_SU3000, HAUPPAUGE_MAX_S2, - TERRATEC_CINERGY_S2, + TERRATEC_CINERGY_S2_R1, TEVII_S480_1, TEVII_S480_2, - X3M_SPC1400HD, + GENIATECH_X3M_SPC1400HD, TEVII_S421, TEVII_S632, TERRATEC_CINERGY_S2_R2, @@ -1784,7 +1784,7 @@ enum dw2102_table_entry { TERRATEC_CINERGY_S2_2, GOTVIEW_SAT_HD, GENIATECH_T220, - TECHNOTREND_S2_4600, + TECHNOTREND_CONNECT_S2_4600, TEVII_S482_1, TEVII_S482_2, TERRATEC_CINERGY_S2_BOX, @@ -1792,42 +1792,36 @@ enum dw2102_table_entry { }; static struct usb_device_id dw2102_table[] = { - [CYPRESS_DW2102] = {USB_DEVICE(USB_VID_CYPRESS, USB_PID_DW2102)}, - [CYPRESS_DW2101] = {USB_DEVICE(USB_VID_CYPRESS, USB_PID_DW2101)}, - [CYPRESS_DW2104] = {USB_DEVICE(USB_VID_CYPRESS, USB_PID_DW2104)}, - [TEVII_S650] = {USB_DEVICE(USB_VID_TEVII, USB_PID_TEVII_S650)}, - [TERRATEC_CINERGY_S] = {USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_S)}, - [CYPRESS_DW3101] = {USB_DEVICE(USB_VID_CYPRESS, USB_PID_DW3101)}, - [TEVII_S630] = {USB_DEVICE(USB_VID_TEVII, USB_PID_TEVII_S630)}, - [PROF_1100] = {USB_DEVICE(USB_VID_PROF_1, USB_PID_PROF_1100)}, - [TEVII_S660] = {USB_DEVICE(USB_VID_TEVII, USB_PID_TEVII_S660)}, - [PROF_7500] = {USB_DEVICE(USB_VID_PROF_2, USB_PID_PROF_7500)}, - [GENIATECH_SU3000] = {USB_DEVICE(USB_VID_GTEK, USB_PID_GENIATECH_SU3000)}, - [HAUPPAUGE_MAX_S2] = {USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_MAX_S2)}, - [TERRATEC_CINERGY_S2] = {USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_S2_R1)}, - [TEVII_S480_1] = {USB_DEVICE(USB_VID_TEVII, USB_PID_TEVII_S480_1)}, - [TEVII_S480_2] = {USB_DEVICE(USB_VID_TEVII, USB_PID_TEVII_S480_2)}, - [X3M_SPC1400HD] = {USB_DEVICE(USB_VID_GTEK, USB_PID_GENIATECH_X3M_SPC1400HD)}, - [TEVII_S421] = {USB_DEVICE(USB_VID_TEVII, USB_PID_TEVII_S421)}, - [TEVII_S632] = {USB_DEVICE(USB_VID_TEVII, USB_PID_TEVII_S632)}, - [TERRATEC_CINERGY_S2_R2] = {USB_DEVICE(USB_VID_TERRATEC, - USB_PID_TERRATEC_CINERGY_S2_R2)}, - [TERRATEC_CINERGY_S2_R3] = {USB_DEVICE(USB_VID_TERRATEC, - USB_PID_TERRATEC_CINERGY_S2_R3)}, - [TERRATEC_CINERGY_S2_R4] = {USB_DEVICE(USB_VID_TERRATEC, - USB_PID_TERRATEC_CINERGY_S2_R4)}, - [TERRATEC_CINERGY_S2_1] = {USB_DEVICE(USB_VID_TERRATEC_2, - USB_PID_TERRATEC_CINERGY_S2_1)}, - [TERRATEC_CINERGY_S2_2] = {USB_DEVICE(USB_VID_TERRATEC_2, - USB_PID_TERRATEC_CINERGY_S2_2)}, - [GOTVIEW_SAT_HD] = {USB_DEVICE(USB_VID_GOTVIEW, USB_PID_GOTVIEW_SAT_HD)}, - [GENIATECH_T220] = {USB_DEVICE(USB_VID_GTEK, USB_PID_GENIATECH_T220)}, - [TECHNOTREND_S2_4600] = {USB_DEVICE(USB_VID_TECHNOTREND, - USB_PID_TECHNOTREND_CONNECT_S2_4600)}, - [TEVII_S482_1] = {USB_DEVICE(USB_VID_TEVII, USB_PID_TTEVII_S482_1)}, - [TEVII_S482_2] = {USB_DEVICE(USB_VID_TEVII, USB_PID_TTEVII_S482_2)}, - [TERRATEC_CINERGY_S2_BOX] = {USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_S2_BOX)}, - [TEVII_S662] = {USB_DEVICE(USB_VID_TEVII, USB_PID_TEVII_S662)}, + DVB_USB_DEV(CYPRESS, CYPRESS_DW2102), + DVB_USB_DEV(CYPRESS, CYPRESS_DW2101), + DVB_USB_DEV(CYPRESS, CYPRESS_DW2104), + DVB_USB_DEV(TEVII, TEVII_S650), + DVB_USB_DEV(TERRATEC, TERRATEC_CINERGY_S), + DVB_USB_DEV(CYPRESS, CYPRESS_DW3101), + DVB_USB_DEV(TEVII, TEVII_S630), + DVB_USB_DEV(PROF_1, PROF_1100), + DVB_USB_DEV(TEVII, TEVII_S660), + DVB_USB_DEV(PROF_2, PROF_7500), + DVB_USB_DEV(GTEK, GENIATECH_SU3000), + DVB_USB_DEV(HAUPPAUGE, HAUPPAUGE_MAX_S2), + DVB_USB_DEV(TERRATEC, TERRATEC_CINERGY_S2_R1), + DVB_USB_DEV(TEVII, TEVII_S480_1), + DVB_USB_DEV(TEVII, TEVII_S480_2), + DVB_USB_DEV(GTEK, GENIATECH_X3M_SPC1400HD), + DVB_USB_DEV(TEVII, TEVII_S421), + DVB_USB_DEV(TEVII, TEVII_S632), + DVB_USB_DEV(TERRATEC, TERRATEC_CINERGY_S2_R2), + DVB_USB_DEV(TERRATEC, TERRATEC_CINERGY_S2_R3), + DVB_USB_DEV(TERRATEC, TERRATEC_CINERGY_S2_R4), + DVB_USB_DEV(TERRATEC_2, TERRATEC_CINERGY_S2_1), + DVB_USB_DEV(TERRATEC_2, TERRATEC_CINERGY_S2_2), + DVB_USB_DEV(GOTVIEW, GOTVIEW_SAT_HD), + DVB_USB_DEV(GTEK, GENIATECH_T220), + DVB_USB_DEV(TECHNOTREND, TECHNOTREND_CONNECT_S2_4600), + DVB_USB_DEV(TEVII, TEVII_S482_1), + DVB_USB_DEV(TEVII, TEVII_S482_2), + DVB_USB_DEV(TERRATEC, TERRATEC_CINERGY_S2_BOX), + DVB_USB_DEV(TEVII, TEVII_S662), { } }; @@ -1889,18 +1883,18 @@ static int dw2102_load_firmware(struct usb_device *dev, case USB_PID_TEVII_S650: dw2104_properties.rc.core.rc_codes = RC_MAP_TEVII_NEC; fallthrough; - case USB_PID_DW2104: + case USB_PID_CYPRESS_DW2104: reset = 1; dw210x_op_rw(dev, 0xc4, 0x0000, 0, &reset, 1, DW210X_WRITE_MSG); fallthrough; - case USB_PID_DW3101: + case USB_PID_CYPRESS_DW3101: reset = 0; dw210x_op_rw(dev, 0xbf, 0x0040, 0, &reset, 0, DW210X_WRITE_MSG); break; case USB_PID_TERRATEC_CINERGY_S: - case USB_PID_DW2102: + case USB_PID_CYPRESS_DW2102: dw210x_op_rw(dev, 0xbf, 0x0040, 0, &reset, 0, DW210X_WRITE_MSG); dw210x_op_rw(dev, 0xb9, 0x0000, 0, &reset16[0], 2, @@ -2350,11 +2344,11 @@ static struct dvb_usb_device_properties su3000_properties = { { NULL }, }, { "Terratec Cinergy S2 USB HD", - { &dw2102_table[TERRATEC_CINERGY_S2], NULL }, + { &dw2102_table[TERRATEC_CINERGY_S2_R1], NULL }, { NULL }, }, { "X3M TV SPC1400HD PCI", - { &dw2102_table[X3M_SPC1400HD], NULL }, + { &dw2102_table[GENIATECH_X3M_SPC1400HD], NULL }, { NULL }, }, { "Terratec Cinergy S2 USB HD Rev.2", @@ -2525,7 +2519,7 @@ static struct dvb_usb_device_properties tt_s2_4600_properties = { .num_device_descs = 5, .devices = { { "TechnoTrend TT-connect S2-4600", - { &dw2102_table[TECHNOTREND_S2_4600], NULL }, + { &dw2102_table[TECHNOTREND_CONNECT_S2_4600], NULL }, { NULL }, }, { "TeVii S482 (tuner 1)", |