include/device/device.h: Remove CHIP_NAME() macro
Macros can be confusing on their own; hiding commas make things worse.
This can sometimes be downright misleading. A "good" example would be
the code in soc/intel/xeon_sp/spr/chip.c:
CHIP_NAME("Intel SapphireRapids-SP").enable_dev = chip_enable_dev,
This appears as CHIP_NAME() being some struct when in fact these are
defining 2 separate members of the same struct.
It was decided to remove this macro altogether, as it does not do
anything special and incurs a maintenance burden.
Change-Id: Iaed6dfb144bddcf5c43634b0c955c19afce388f0
Signed-off-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80239
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Jakub Czapiga <czapiga@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
diff --git a/src/drivers/i2c/at24rf08c/at24rf08c.c b/src/drivers/i2c/at24rf08c/at24rf08c.c
index ce6aa86..99ea7a4 100644
--- a/src/drivers/i2c/at24rf08c/at24rf08c.c
+++ b/src/drivers/i2c/at24rf08c/at24rf08c.c
@@ -41,6 +41,6 @@
}
struct chip_operations drivers_i2c_at24rf08c_ops = {
- CHIP_NAME("AT24RF08C")
+ .name = "AT24RF08C",
.enable_dev = enable_dev,
};
diff --git a/src/drivers/i2c/ck505/ck505.c b/src/drivers/i2c/ck505/ck505.c
index 58eaec6..db660fe 100644
--- a/src/drivers/i2c/ck505/ck505.c
+++ b/src/drivers/i2c/ck505/ck505.c
@@ -55,6 +55,6 @@
}
struct chip_operations drivers_i2c_ck505_ops = {
- CHIP_NAME("CK505 Clock generator")
+ .name = "CK505 Clock generator",
.enable_dev = enable_dev,
};
diff --git a/src/drivers/i2c/cs35l53/cs35l53.c b/src/drivers/i2c/cs35l53/cs35l53.c
index 9857203..578e272 100644
--- a/src/drivers/i2c/cs35l53/cs35l53.c
+++ b/src/drivers/i2c/cs35l53/cs35l53.c
@@ -145,6 +145,6 @@
}
struct chip_operations drivers_i2c_cs35l53_ops = {
- CHIP_NAME("Cirrus Logic CS35L53 Audio Codec")
+ .name = "Cirrus Logic CS35L53 Audio Codec",
.enable_dev = cs35l53_enable
};
diff --git a/src/drivers/i2c/cs42l42/cs42l42.c b/src/drivers/i2c/cs42l42/cs42l42.c
index dcf83e0..8ccfd77 100644
--- a/src/drivers/i2c/cs42l42/cs42l42.c
+++ b/src/drivers/i2c/cs42l42/cs42l42.c
@@ -118,6 +118,6 @@
}
struct chip_operations drivers_i2c_cs42l42_ops = {
- CHIP_NAME("Cirrus Logic CS42l42 Audio Codec")
+ .name = "Cirrus Logic CS42l42 Audio Codec",
.enable_dev = cs42l42_enable
};
diff --git a/src/drivers/i2c/da7219/da7219.c b/src/drivers/i2c/da7219/da7219.c
index 80c5272..1a149ca 100644
--- a/src/drivers/i2c/da7219/da7219.c
+++ b/src/drivers/i2c/da7219/da7219.c
@@ -110,6 +110,6 @@
}
struct chip_operations drivers_i2c_da7219_ops = {
- CHIP_NAME("Dialog Semiconductor DA7219 Audio Codec")
+ .name = "Dialog Semiconductor DA7219 Audio Codec",
.enable_dev = da7219_enable
};
diff --git a/src/drivers/i2c/generic/generic.c b/src/drivers/i2c/generic/generic.c
index 1a3ec40..2a4acb2 100644
--- a/src/drivers/i2c/generic/generic.c
+++ b/src/drivers/i2c/generic/generic.c
@@ -229,6 +229,6 @@
}
struct chip_operations drivers_i2c_generic_ops = {
- CHIP_NAME("I2C Device")
+ .name = "I2C Device",
.enable_dev = i2c_generic_enable
};
diff --git a/src/drivers/i2c/gpiomux/bus/bus.c b/src/drivers/i2c/gpiomux/bus/bus.c
index 2bdb1030..a6c603a 100644
--- a/src/drivers/i2c/gpiomux/bus/bus.c
+++ b/src/drivers/i2c/gpiomux/bus/bus.c
@@ -55,6 +55,6 @@
}
struct chip_operations drivers_i2c_gpiomux_bus_ops = {
- CHIP_NAME("I2C GPIO MUX Bus Device")
+ .name = "I2C GPIO MUX Bus Device",
.enable_dev = i2c_gpiomux_bus_enable
};
diff --git a/src/drivers/i2c/gpiomux/mux/mux.c b/src/drivers/i2c/gpiomux/mux/mux.c
index fa1b18c..5f79fe5 100644
--- a/src/drivers/i2c/gpiomux/mux/mux.c
+++ b/src/drivers/i2c/gpiomux/mux/mux.c
@@ -77,6 +77,6 @@
}
struct chip_operations drivers_i2c_gpiomux_mux_ops = {
- CHIP_NAME("I2C GPIO MUX Device")
+ .name = "I2C GPIO MUX Device",
.enable_dev = i2c_gpiomux_mux_enable
};
diff --git a/src/drivers/i2c/hid/hid.c b/src/drivers/i2c/hid/hid.c
index 8705c1e..fb3a439 100644
--- a/src/drivers/i2c/hid/hid.c
+++ b/src/drivers/i2c/hid/hid.c
@@ -90,6 +90,6 @@
}
struct chip_operations drivers_i2c_hid_ops = {
- CHIP_NAME("I2C HID Device")
+ .name = "I2C HID Device",
.enable_dev = i2c_hid_enable
};
diff --git a/src/drivers/i2c/lm96000/lm96000.c b/src/drivers/i2c/lm96000/lm96000.c
index a2b7a21..f17d8c0 100644
--- a/src/drivers/i2c/lm96000/lm96000.c
+++ b/src/drivers/i2c/lm96000/lm96000.c
@@ -215,6 +215,6 @@
}
struct chip_operations drivers_i2c_lm96000_ops = {
- CHIP_NAME("LM96000")
+ .name = "LM96000",
.enable_dev = lm96000_enable
};
diff --git a/src/drivers/i2c/max98373/max98373.c b/src/drivers/i2c/max98373/max98373.c
index eb5590d..37a8864 100644
--- a/src/drivers/i2c/max98373/max98373.c
+++ b/src/drivers/i2c/max98373/max98373.c
@@ -90,6 +90,6 @@
}
struct chip_operations drivers_i2c_max98373_ops = {
- CHIP_NAME("Maxim MAX98373 Codec")
+ .name = "Maxim MAX98373 Codec",
.enable_dev = max98373_enable
};
diff --git a/src/drivers/i2c/max98390/max98390.c b/src/drivers/i2c/max98390/max98390.c
index 11acd22..f4c4a70 100644
--- a/src/drivers/i2c/max98390/max98390.c
+++ b/src/drivers/i2c/max98390/max98390.c
@@ -129,6 +129,6 @@
}
struct chip_operations drivers_i2c_max98390_ops = {
- CHIP_NAME("Maxim MAX98390 Codec")
+ .name = "Maxim MAX98390 Codec",
.enable_dev = max98390_enable
};
diff --git a/src/drivers/i2c/max98396/max98396.c b/src/drivers/i2c/max98396/max98396.c
index 5288c4f..6ad3931 100644
--- a/src/drivers/i2c/max98396/max98396.c
+++ b/src/drivers/i2c/max98396/max98396.c
@@ -96,6 +96,6 @@
}
struct chip_operations drivers_i2c_max98396_ops = {
- CHIP_NAME("Maxim MAX98396 Codec")
+ .name = "Maxim MAX98396 Codec",
.enable_dev = max98396_enable
};
diff --git a/src/drivers/i2c/max98927/max98927.c b/src/drivers/i2c/max98927/max98927.c
index e80f569f..9935d10 100644
--- a/src/drivers/i2c/max98927/max98927.c
+++ b/src/drivers/i2c/max98927/max98927.c
@@ -86,6 +86,6 @@
}
struct chip_operations drivers_i2c_max98927_ops = {
- CHIP_NAME("Maxim MAX98927 Codec")
+ .name = "Maxim MAX98927 Codec",
.enable_dev = max98927_enable
};
diff --git a/src/drivers/i2c/nau8825/nau8825.c b/src/drivers/i2c/nau8825/nau8825.c
index 060df7c..9e82538 100644
--- a/src/drivers/i2c/nau8825/nau8825.c
+++ b/src/drivers/i2c/nau8825/nau8825.c
@@ -103,6 +103,6 @@
}
struct chip_operations drivers_i2c_nau8825_ops = {
- CHIP_NAME("Nuvoton NAU8825 Codec")
+ .name = "Nuvoton NAU8825 Codec",
.enable_dev = nau8825_enable
};
diff --git a/src/drivers/i2c/nct7802y/nct7802y.c b/src/drivers/i2c/nct7802y/nct7802y.c
index bb52a3f..f313ef7 100644
--- a/src/drivers/i2c/nct7802y/nct7802y.c
+++ b/src/drivers/i2c/nct7802y/nct7802y.c
@@ -45,6 +45,6 @@
}
struct chip_operations drivers_i2c_nct7802y_ops = {
- CHIP_NAME("NCT7802Y")
+ .name = "NCT7802Y",
.enable_dev = nct7802y_enable
};
diff --git a/src/drivers/i2c/pca9538/pca9538.c b/src/drivers/i2c/pca9538/pca9538.c
index 1658b9e..f8933ec 100644
--- a/src/drivers/i2c/pca9538/pca9538.c
+++ b/src/drivers/i2c/pca9538/pca9538.c
@@ -49,6 +49,6 @@
}
struct chip_operations drivers_i2c_pca9538_ops = {
- CHIP_NAME("PCA9538")
+ .name = "PCA9538",
.enable_dev = pca9538_enable
};
diff --git a/src/drivers/i2c/pcf8523/pcf8523.c b/src/drivers/i2c/pcf8523/pcf8523.c
index 8d368b2..717bc90 100644
--- a/src/drivers/i2c/pcf8523/pcf8523.c
+++ b/src/drivers/i2c/pcf8523/pcf8523.c
@@ -129,6 +129,6 @@
}
struct chip_operations drivers_i2c_pcf8523_ops = {
- CHIP_NAME("PCF8523")
+ .name = "PCF8523",
.enable_dev = pcf8523_enable
};
diff --git a/src/drivers/i2c/pi608gp/pi608gp.c b/src/drivers/i2c/pi608gp/pi608gp.c
index 2c61a80..62d462e 100644
--- a/src/drivers/i2c/pi608gp/pi608gp.c
+++ b/src/drivers/i2c/pi608gp/pi608gp.c
@@ -188,5 +188,5 @@
};
struct chip_operations drivers_i2c_pi608gp_ops = {
- CHIP_NAME("PI7C9X2G608GP")
+ .name = "PI7C9X2G608GP",
};
diff --git a/src/drivers/i2c/ptn3460/ptn3460.c b/src/drivers/i2c/ptn3460/ptn3460.c
index 7dee222..93acb18 100644
--- a/src/drivers/i2c/ptn3460/ptn3460.c
+++ b/src/drivers/i2c/ptn3460/ptn3460.c
@@ -148,7 +148,7 @@
}
struct chip_operations drivers_i2c_ptn3460_ops = {
- CHIP_NAME("PTN3460")
+ .name = "PTN3460",
.enable_dev = ptn3460_enable
};
diff --git a/src/drivers/i2c/rt1011/rt1011.c b/src/drivers/i2c/rt1011/rt1011.c
index 9a21748..bf62a6f 100644
--- a/src/drivers/i2c/rt1011/rt1011.c
+++ b/src/drivers/i2c/rt1011/rt1011.c
@@ -103,6 +103,6 @@
}
struct chip_operations drivers_i2c_rt1011_ops = {
- CHIP_NAME("Realtek RT1011 Codec")
+ .name = "Realtek RT1011 Codec",
.enable_dev = rt1011_enable
};
diff --git a/src/drivers/i2c/rt5663/rt5663.c b/src/drivers/i2c/rt5663/rt5663.c
index 9949566..e2341dd 100644
--- a/src/drivers/i2c/rt5663/rt5663.c
+++ b/src/drivers/i2c/rt5663/rt5663.c
@@ -84,6 +84,6 @@
}
struct chip_operations drivers_i2c_rt5663_ops = {
- CHIP_NAME("Realtek RT5663 Codec")
+ .name = "Realtek RT5663 Codec",
.enable_dev = rt5663_enable
};
diff --git a/src/drivers/i2c/rtd2132/rtd2132.c b/src/drivers/i2c/rtd2132/rtd2132.c
index 41dd887..82b032e 100644
--- a/src/drivers/i2c/rtd2132/rtd2132.c
+++ b/src/drivers/i2c/rtd2132/rtd2132.c
@@ -235,6 +235,6 @@
}
struct chip_operations drivers_i2c_rtd2132_ops = {
- CHIP_NAME("Realtek RTD2132 LVDS Bridge")
+ .name = "Realtek RTD2132 LVDS Bridge",
.enable_dev = enable_dev,
};
diff --git a/src/drivers/i2c/rv3028c7/rv3028c7.c b/src/drivers/i2c/rv3028c7/rv3028c7.c
index 87cbc24..0a1e4b6 100644
--- a/src/drivers/i2c/rv3028c7/rv3028c7.c
+++ b/src/drivers/i2c/rv3028c7/rv3028c7.c
@@ -251,6 +251,6 @@
}
struct chip_operations drivers_i2c_rv3028c7_ops = {
- CHIP_NAME("RV-3028-C7")
+ .name = "RV-3028-C7",
.enable_dev = rtc_enable
};
diff --git a/src/drivers/i2c/rx6110sa/rx6110sa.c b/src/drivers/i2c/rx6110sa/rx6110sa.c
index 02b3d9f..ce5051d 100644
--- a/src/drivers/i2c/rx6110sa/rx6110sa.c
+++ b/src/drivers/i2c/rx6110sa/rx6110sa.c
@@ -239,6 +239,6 @@
}
struct chip_operations drivers_i2c_rx6110sa_ops = {
- CHIP_NAME("RX6110 SA")
+ .name = "RX6110 SA",
.enable_dev = rx6110sa_enable
};
diff --git a/src/drivers/i2c/sx9310/sx9310.c b/src/drivers/i2c/sx9310/sx9310.c
index 68aea6c..5094608 100644
--- a/src/drivers/i2c/sx9310/sx9310.c
+++ b/src/drivers/i2c/sx9310/sx9310.c
@@ -131,6 +131,6 @@
}
struct chip_operations drivers_i2c_sx9310_ops = {
- CHIP_NAME(I2C_SX9310_ACPI_NAME)
+ .name = I2C_SX9310_ACPI_NAME,
.enable_dev = i2c_sx9310_enable
};
diff --git a/src/drivers/i2c/sx9324/sx9324.c b/src/drivers/i2c/sx9324/sx9324.c
index 3678491..05aca00 100644
--- a/src/drivers/i2c/sx9324/sx9324.c
+++ b/src/drivers/i2c/sx9324/sx9324.c
@@ -115,6 +115,6 @@
}
struct chip_operations drivers_i2c_sx9324_ops = {
- CHIP_NAME(I2C_SX9324_CHIP_NAME)
+ .name = I2C_SX9324_CHIP_NAME,
.enable_dev = i2c_sx9324_enable
};
diff --git a/src/drivers/i2c/sx9360/sx9360.c b/src/drivers/i2c/sx9360/sx9360.c
index 9ea4c8b..c9de0de 100644
--- a/src/drivers/i2c/sx9360/sx9360.c
+++ b/src/drivers/i2c/sx9360/sx9360.c
@@ -102,6 +102,6 @@
}
struct chip_operations drivers_i2c_sx9360_ops = {
- CHIP_NAME(I2C_SX9360_CHIP_NAME)
+ .name = I2C_SX9360_CHIP_NAME,
.enable_dev = i2c_sx9360_enable
};
diff --git a/src/drivers/i2c/tas5825m/tas5825m.c b/src/drivers/i2c/tas5825m/tas5825m.c
index 39e5575..9f14059 100644
--- a/src/drivers/i2c/tas5825m/tas5825m.c
+++ b/src/drivers/i2c/tas5825m/tas5825m.c
@@ -75,6 +75,6 @@
}
struct chip_operations drivers_i2c_tas5825m_ops = {
- CHIP_NAME("TI TAS5825M Amplifier")
+ .name = "TI TAS5825M Amplifier",
.enable_dev = tas5825m_enable_dev,
};
diff --git a/src/drivers/i2c/tpm/chip.c b/src/drivers/i2c/tpm/chip.c
index 07052f6..a1d7389 100644
--- a/src/drivers/i2c/tpm/chip.c
+++ b/src/drivers/i2c/tpm/chip.c
@@ -95,6 +95,6 @@
}
struct chip_operations drivers_i2c_tpm_ops = {
- CHIP_NAME("I2C TPM")
+ .name = "I2C TPM",
.enable_dev = i2c_tpm_enable
};