src: Make PCI ID define names shorter
Shorten define names containing PCI_{DEVICE,VENDOR}_ID_ with
PCI_{DID,VID}_ using the commands below, which also take care of some
spacing issues. An additional clean up of pci_ids.h is done in
CB:61531.
Used commands:
* find -type f -exec sed -i 's/PCI_\([DV]\)\(EVICE\|ENDOR\)_ID_\([_0-9A-Za-z]\{2\}\([_0-9A-Za-z]\{8\}\)*[_0-9A-Za-z]\{0,5\}\)\t/PCI_\1ID_\3\t\t/g'
* find -type f -exec sed -i 's/PCI_\([DV]\)\(EVICE\|ENDOR\)_ID_\([_0-9A-Za-z]*\)/PCI_\1ID_\3/g'
Change-Id: If9027700f53b6d0d3964c26a41a1f9b8f62be178
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/39331
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
diff --git a/src/drivers/wifi/generic/acpi.c b/src/drivers/wifi/generic/acpi.c
index 16c1839..63faae0 100644
--- a/src/drivers/wifi/generic/acpi.c
+++ b/src/drivers/wifi/generic/acpi.c
@@ -470,7 +470,7 @@
* If device type is PCI, ensure that the device has Intel vendor ID. CBFS SAR and SAR
* ACPI tables are currently used only by Intel WiFi devices.
*/
- if (dev->path.type == DEVICE_PATH_PCI && dev->vendor != PCI_VENDOR_ID_INTEL)
+ if (dev->path.type == DEVICE_PATH_PCI && dev->vendor != PCI_VID_INTEL)
return;
/* Retrieve the sar limits data */
diff --git a/src/drivers/wifi/generic/generic.c b/src/drivers/wifi/generic/generic.c
index 1ee7ab2..de93741 100644
--- a/src/drivers/wifi/generic/generic.c
+++ b/src/drivers/wifi/generic/generic.c
@@ -59,44 +59,44 @@
};
static const unsigned short intel_pci_device_ids[] = {
- PCI_DEVICE_ID_1000_SERIES_WIFI,
- PCI_DEVICE_ID_6005_SERIES_WIFI,
- PCI_DEVICE_ID_6005_I_SERIES_WIFI,
- PCI_DEVICE_ID_1030_SERIES_WIFI,
- PCI_DEVICE_ID_6030_I_SERIES_WIFI,
- PCI_DEVICE_ID_6030_SERIES_WIFI,
- PCI_DEVICE_ID_6150_SERIES_WIFI,
- PCI_DEVICE_ID_2030_SERIES_WIFI,
- PCI_DEVICE_ID_2000_SERIES_WIFI,
- PCI_DEVICE_ID_0135_SERIES_WIFI,
- PCI_DEVICE_ID_0105_SERIES_WIFI,
- PCI_DEVICE_ID_6035_SERIES_WIFI,
- PCI_DEVICE_ID_5300_SERIES_WIFI,
- PCI_DEVICE_ID_5100_SERIES_WIFI,
- PCI_DEVICE_ID_6000_SERIES_WIFI,
- PCI_DEVICE_ID_6000_I_SERIES_WIFI,
- PCI_DEVICE_ID_5350_SERIES_WIFI,
- PCI_DEVICE_ID_5150_SERIES_WIFI,
+ PCI_DID_1000_SERIES_WIFI,
+ PCI_DID_6005_SERIES_WIFI,
+ PCI_DID_6005_I_SERIES_WIFI,
+ PCI_DID_1030_SERIES_WIFI,
+ PCI_DID_6030_I_SERIES_WIFI,
+ PCI_DID_6030_SERIES_WIFI,
+ PCI_DID_6150_SERIES_WIFI,
+ PCI_DID_2030_SERIES_WIFI,
+ PCI_DID_2000_SERIES_WIFI,
+ PCI_DID_0135_SERIES_WIFI,
+ PCI_DID_0105_SERIES_WIFI,
+ PCI_DID_6035_SERIES_WIFI,
+ PCI_DID_5300_SERIES_WIFI,
+ PCI_DID_5100_SERIES_WIFI,
+ PCI_DID_6000_SERIES_WIFI,
+ PCI_DID_6000_I_SERIES_WIFI,
+ PCI_DID_5350_SERIES_WIFI,
+ PCI_DID_5150_SERIES_WIFI,
/* Wilkins Peak 2 */
- PCI_DEVICE_ID_WP_7260_SERIES_1_WIFI,
- PCI_DEVICE_ID_WP_7260_SERIES_2_WIFI,
+ PCI_DID_WP_7260_SERIES_1_WIFI,
+ PCI_DID_WP_7260_SERIES_2_WIFI,
/* Stone Peak 2 */
- PCI_DEVICE_ID_SP_7265_SERIES_1_WIFI,
- PCI_DEVICE_ID_SP_7265_SERIES_2_WIFI,
+ PCI_DID_SP_7265_SERIES_1_WIFI,
+ PCI_DID_SP_7265_SERIES_2_WIFI,
/* Stone Field Peak */
- PCI_DEVICE_ID_SFP_8260_SERIES_1_WIFI,
- PCI_DEVICE_ID_SFP_8260_SERIES_2_WIFI,
+ PCI_DID_SFP_8260_SERIES_1_WIFI,
+ PCI_DID_SFP_8260_SERIES_2_WIFI,
/* Windstorm Peak */
- PCI_DEVICE_ID_WSP_8275_SERIES_1_WIFI,
+ PCI_DID_WSP_8275_SERIES_1_WIFI,
/* Thunder Peak 2 */
- PCI_DEVICE_ID_TP_9260_SERIES_WIFI,
+ PCI_DID_TP_9260_SERIES_WIFI,
/* Cyclone Peak */
- PCI_DEVICE_ID_CyP_6SERIES_WIFI,
+ PCI_DID_CyP_6SERIES_WIFI,
/* Typhoon Peak */
- PCI_DEVICE_ID_TyP_6SERIES_WIFI,
+ PCI_DID_TyP_6SERIES_WIFI,
/* Garfield Peak */
- PCI_DEVICE_ID_GrP_6SERIES_1_WIFI,
- PCI_DEVICE_ID_GrP_6SERIES_2_WIFI,
+ PCI_DID_GrP_6SERIES_1_WIFI,
+ PCI_DID_GrP_6SERIES_2_WIFI,
0
};
@@ -108,6 +108,6 @@
*/
static const struct pci_driver intel_wifi_pci_driver __pci_driver = {
.ops = &wifi_pcie_ops,
- .vendor = PCI_VENDOR_ID_INTEL,
+ .vendor = PCI_VID_INTEL,
.devices = intel_pci_device_ids,
};
diff --git a/src/drivers/wifi/generic/smbios.c b/src/drivers/wifi/generic/smbios.c
index 9c83df6..82c96a5 100644
--- a/src/drivers/wifi/generic/smbios.c
+++ b/src/drivers/wifi/generic/smbios.c
@@ -8,7 +8,7 @@
static int smbios_write_intel_wifi(struct device *dev, int *handle, unsigned long *current)
{
- if (dev->vendor != PCI_VENDOR_ID_INTEL)
+ if (dev->vendor != PCI_VID_INTEL)
return 0;
struct smbios_type_intel_wifi {