mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
media: pci: Use PCI_DEVICE macros and drop zeros from pci_device_id arrays
Some pci_device_id arrays already used the PCI_DEVICE macros, others used named initializers or list initializers. Unify all to use the PCI_DEVICE macros and (if applicable) a named initializer for .driver_data. Also drop all zeros that the compiler can care for and unify indention and spacing. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
committed by
Hans Verkuil
parent
dd5f981d02
commit
007b61981a
@@ -3563,12 +3563,12 @@ static int __maybe_unused bttv_resume(struct device *dev)
|
||||
}
|
||||
|
||||
static const struct pci_device_id bttv_pci_tbl[] = {
|
||||
{PCI_VDEVICE(BROOKTREE, PCI_DEVICE_ID_BT848), 0},
|
||||
{PCI_VDEVICE(BROOKTREE, PCI_DEVICE_ID_BT849), 0},
|
||||
{PCI_VDEVICE(BROOKTREE, PCI_DEVICE_ID_BT878), 0},
|
||||
{PCI_VDEVICE(BROOKTREE, PCI_DEVICE_ID_BT879), 0},
|
||||
{PCI_VDEVICE(BROOKTREE, PCI_DEVICE_ID_FUSION879), 0},
|
||||
{0,}
|
||||
{ PCI_VDEVICE(BROOKTREE, PCI_DEVICE_ID_BT848) },
|
||||
{ PCI_VDEVICE(BROOKTREE, PCI_DEVICE_ID_BT849) },
|
||||
{ PCI_VDEVICE(BROOKTREE, PCI_DEVICE_ID_BT878) },
|
||||
{ PCI_VDEVICE(BROOKTREE, PCI_DEVICE_ID_BT879) },
|
||||
{ PCI_VDEVICE(BROOKTREE, PCI_DEVICE_ID_FUSION879) },
|
||||
{ }
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(pci, bttv_pci_tbl);
|
||||
|
||||
@@ -26,9 +26,8 @@
|
||||
|
||||
/* add your revision and whatnot here */
|
||||
static const struct pci_device_id cobalt_pci_tbl[] = {
|
||||
{PCI_VENDOR_ID_CISCO, PCI_DEVICE_ID_COBALT,
|
||||
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
|
||||
{0,}
|
||||
{ PCI_VDEVICE(CISCO, PCI_DEVICE_ID_COBALT) },
|
||||
{ }
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(pci, cobalt_pci_tbl);
|
||||
|
||||
@@ -40,9 +40,8 @@ EXPORT_SYMBOL(cx18_ext_init);
|
||||
|
||||
/* add your revision and whatnot here */
|
||||
static const struct pci_device_id cx18_pci_tbl[] = {
|
||||
{PCI_VENDOR_ID_CX, PCI_DEVICE_ID_CX23418,
|
||||
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
|
||||
{0,}
|
||||
{ PCI_VDEVICE(CX, PCI_DEVICE_ID_CX23418) },
|
||||
{ }
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(pci, cx18_pci_tbl);
|
||||
|
||||
@@ -2279,16 +2279,10 @@ static int __maybe_unused cx23885_resume(struct device *dev_d)
|
||||
static const struct pci_device_id cx23885_pci_tbl[] = {
|
||||
{
|
||||
/* CX23885 */
|
||||
.vendor = 0x14f1,
|
||||
.device = 0x8852,
|
||||
.subvendor = PCI_ANY_ID,
|
||||
.subdevice = PCI_ANY_ID,
|
||||
PCI_DEVICE(0x14f1, 0x8852),
|
||||
}, {
|
||||
/* CX23887 Rev 2 */
|
||||
.vendor = 0x14f1,
|
||||
.device = 0x8880,
|
||||
.subvendor = PCI_ANY_ID,
|
||||
.subdevice = PCI_ANY_ID,
|
||||
PCI_DEVICE(0x14f1, 0x8880),
|
||||
}, {
|
||||
/* --- end of list --- */
|
||||
}
|
||||
|
||||
@@ -681,8 +681,8 @@ static int snd_cx25821_pcm(struct cx25821_audio_dev *chip, int device,
|
||||
*/
|
||||
|
||||
static const struct pci_device_id __maybe_unused cx25821_audio_pci_tbl[] = {
|
||||
{0x14f1, 0x0920, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
|
||||
{0,}
|
||||
{ PCI_DEVICE(0x14f1, 0x0920) },
|
||||
{ }
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(pci, cx25821_audio_pci_tbl);
|
||||
|
||||
@@ -1347,16 +1347,10 @@ static void cx25821_finidev(struct pci_dev *pci_dev)
|
||||
static const struct pci_device_id cx25821_pci_tbl[] = {
|
||||
{
|
||||
/* CX25821 Athena */
|
||||
.vendor = 0x14f1,
|
||||
.device = 0x8210,
|
||||
.subvendor = 0x14f1,
|
||||
.subdevice = 0x0920,
|
||||
PCI_DEVICE_SUB(0x14f1, 0x8210, 0x14f1, 0x0920),
|
||||
}, {
|
||||
/* CX25821 No Brand */
|
||||
.vendor = 0x14f1,
|
||||
.device = 0x8210,
|
||||
.subvendor = 0x0000,
|
||||
.subdevice = 0x0000,
|
||||
PCI_DEVICE_SUB(0x14f1, 0x8210, 0x0000, 0x0000),
|
||||
}, {
|
||||
/* --- end of list --- */
|
||||
}
|
||||
|
||||
@@ -809,9 +809,9 @@ static const struct snd_kcontrol_new snd_cx88_alc_switch = {
|
||||
*/
|
||||
|
||||
static const struct pci_device_id cx88_audio_pci_tbl[] = {
|
||||
{0x14f1, 0x8801, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
|
||||
{0x14f1, 0x8811, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
|
||||
{0, }
|
||||
{ PCI_DEVICE(0x14f1, 0x8801) },
|
||||
{ PCI_DEVICE(0x14f1, 0x8811) },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(pci, cx88_audio_pci_tbl);
|
||||
|
||||
|
||||
@@ -787,10 +787,7 @@ static void cx8802_remove(struct pci_dev *pci_dev)
|
||||
|
||||
static const struct pci_device_id cx8802_pci_tbl[] = {
|
||||
{
|
||||
.vendor = 0x14f1,
|
||||
.device = 0x8802,
|
||||
.subvendor = PCI_ANY_ID,
|
||||
.subdevice = PCI_ANY_ID,
|
||||
PCI_DEVICE(0x14f1, 0x8802),
|
||||
}, {
|
||||
/* --- end of list --- */
|
||||
}
|
||||
|
||||
@@ -1610,10 +1610,7 @@ static int __maybe_unused cx8800_resume(struct device *dev_d)
|
||||
|
||||
static const struct pci_device_id cx8800_pci_tbl[] = {
|
||||
{
|
||||
.vendor = 0x14f1,
|
||||
.device = 0x8800,
|
||||
.subvendor = PCI_ANY_ID,
|
||||
.subdevice = PCI_ANY_ID,
|
||||
PCI_DEVICE(0x14f1, 0x8800),
|
||||
}, {
|
||||
/* --- end of list --- */
|
||||
}
|
||||
|
||||
@@ -269,7 +269,7 @@ static const struct pci_device_id ddb_id_table[] = {
|
||||
DDB_DEVICE_ANY(0x0323),
|
||||
DDB_DEVICE_ANY(0x0328),
|
||||
DDB_DEVICE_ANY(0x0329),
|
||||
{0}
|
||||
{ }
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(pci, ddb_id_table);
|
||||
|
||||
@@ -1209,15 +1209,9 @@ static void dm1105_remove(struct pci_dev *pdev)
|
||||
|
||||
static const struct pci_device_id dm1105_id_table[] = {
|
||||
{
|
||||
.vendor = PCI_VENDOR_ID_TRIGEM,
|
||||
.device = PCI_DEVICE_ID_DM1105,
|
||||
.subvendor = PCI_ANY_ID,
|
||||
.subdevice = PCI_ANY_ID,
|
||||
PCI_VDEVICE(TRIGEM, PCI_DEVICE_ID_DM1105),
|
||||
}, {
|
||||
.vendor = PCI_VENDOR_ID_AXESS,
|
||||
.device = PCI_DEVICE_ID_DM05,
|
||||
.subvendor = PCI_ANY_ID,
|
||||
.subdevice = PCI_ANY_ID,
|
||||
PCI_VDEVICE(AXESS, PCI_DEVICE_ID_DM05),
|
||||
}, {
|
||||
/* empty */
|
||||
},
|
||||
|
||||
@@ -577,8 +577,8 @@ static void dt3155_remove(struct pci_dev *pdev)
|
||||
}
|
||||
|
||||
static const struct pci_device_id pci_ids[] = {
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, DT3155_DEVICE_ID) },
|
||||
{ 0, /* zero marks the end */ },
|
||||
{ PCI_VDEVICE(INTEL, DT3155_DEVICE_ID) },
|
||||
{ /* zero marks the end */ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(pci, pci_ids);
|
||||
|
||||
|
||||
@@ -1961,7 +1961,7 @@ static const struct dev_pm_ops cio2_pm_ops = {
|
||||
};
|
||||
|
||||
static const struct pci_device_id cio2_pci_id_table[] = {
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, CIO2_PCI_ID) },
|
||||
{ PCI_VDEVICE(INTEL, CIO2_PCI_ID) },
|
||||
{ }
|
||||
};
|
||||
|
||||
|
||||
@@ -60,11 +60,9 @@ EXPORT_SYMBOL(ivtv_ext_init);
|
||||
|
||||
/* add your revision and whatnot here */
|
||||
static const struct pci_device_id ivtv_pci_tbl[] = {
|
||||
{PCI_VENDOR_ID_ICOMP, PCI_DEVICE_ID_IVTV15,
|
||||
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
|
||||
{PCI_VENDOR_ID_ICOMP, PCI_DEVICE_ID_IVTV16,
|
||||
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
|
||||
{0,}
|
||||
{ PCI_VDEVICE(ICOMP, PCI_DEVICE_ID_IVTV15) },
|
||||
{ PCI_VDEVICE(ICOMP, PCI_DEVICE_ID_IVTV16) },
|
||||
{ }
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(pci,ivtv_pci_tbl);
|
||||
|
||||
@@ -58,11 +58,9 @@
|
||||
#define TERRATEC 0x153b
|
||||
|
||||
#define MAKE_ENTRY(__subven, __subdev, __configptr, __rc) { \
|
||||
.vendor = TWINHAN_TECHNOLOGIES, \
|
||||
.device = MANTIS, \
|
||||
.subvendor = (__subven), \
|
||||
.subdevice = (__subdev), \
|
||||
.driver_data = (unsigned long) \
|
||||
PCI_DEVICE_SUB(TWINHAN_TECHNOLOGIES, MANTIS, \
|
||||
(__subven), (__subdev)), \
|
||||
.driver_data = (unsigned long) \
|
||||
&(struct mantis_pci_drvdata){__configptr, __rc} \
|
||||
}
|
||||
|
||||
|
||||
@@ -694,9 +694,9 @@ static void mgb4_remove(struct pci_dev *pdev)
|
||||
}
|
||||
|
||||
static const struct pci_device_id mgb4_pci_ids[] = {
|
||||
{ PCI_DEVICE(DIGITEQ_VID, T100_DID), },
|
||||
{ PCI_DEVICE(DIGITEQ_VID, T200_DID), },
|
||||
{ 0, }
|
||||
{ PCI_DEVICE(DIGITEQ_VID, T100_DID) },
|
||||
{ PCI_DEVICE(DIGITEQ_VID, T200_DID) },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(pci, mgb4_pci_ids);
|
||||
|
||||
|
||||
@@ -1014,7 +1014,7 @@ static void netup_unidvb_finidev(struct pci_dev *pci_dev)
|
||||
static const struct pci_device_id netup_unidvb_pci_tbl[] = {
|
||||
{ PCI_DEVICE(0x1b55, 0x18f6) }, /* hw rev. 1.3 */
|
||||
{ PCI_DEVICE(0x1b55, 0x18f7) }, /* hw rev. 1.4 */
|
||||
{ 0, }
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(pci, netup_unidvb_pci_tbl);
|
||||
|
||||
|
||||
@@ -1155,8 +1155,7 @@ static const struct ngene_info ngene_info_terratec = {
|
||||
/****************************************************************************/
|
||||
|
||||
#define NGENE_ID(_subvend, _subdev, _driverdata) { \
|
||||
.vendor = NGENE_VID, .device = NGENE_PID, \
|
||||
.subvendor = _subvend, .subdevice = _subdev, \
|
||||
PCI_DEVICE_SUB(NGENE_VID, NGENE_PID, (_subvend), (_subdev)), \
|
||||
.driver_data = (unsigned long) &_driverdata }
|
||||
|
||||
/****************************************************************************/
|
||||
@@ -1173,7 +1172,7 @@ static const struct pci_device_id ngene_id_tbl[] = {
|
||||
NGENE_ID(0x18c3, 0xdd20, ngene_info_duoFlex),
|
||||
NGENE_ID(0x1461, 0x062e, ngene_info_m780),
|
||||
NGENE_ID(0x153b, 0x1167, ngene_info_terratec),
|
||||
{0}
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(pci, ngene_id_tbl);
|
||||
|
||||
|
||||
@@ -762,10 +762,7 @@ static void pluto2_remove(struct pci_dev *pdev)
|
||||
|
||||
static const struct pci_device_id pluto2_id_table[] = {
|
||||
{
|
||||
.vendor = PCI_VENDOR_ID_SCM,
|
||||
.device = PCI_DEVICE_ID_PLUTO2,
|
||||
.subvendor = PCI_ANY_ID,
|
||||
.subdevice = PCI_ANY_ID,
|
||||
PCI_VDEVICE(SCM, PCI_DEVICE_ID_PLUTO2),
|
||||
}, {
|
||||
/* empty */
|
||||
},
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user