diff options
author | Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com> | 2024-01-30 09:53:46 +0900 |
---|---|---|
committer | Felix Singer <service+coreboot-gerrit@felixsinger.de> | 2024-01-31 09:51:58 +0000 |
commit | bfb11bec3b3fec638adf864a9b9b2cff6671fed8 (patch) | |
tree | 0247c385cfbd79aa8496b1ddc3c3afcce1465616 /src/ec/google | |
parent | f4c496d3e3e779b3d870d13e1e359a3b5f7087cb (diff) |
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>
Diffstat (limited to 'src/ec/google')
-rw-r--r-- | src/ec/google/chromeec/audio_codec/audio_codec.c | 2 | ||||
-rw-r--r-- | src/ec/google/chromeec/ec_lpc.c | 2 | ||||
-rw-r--r-- | src/ec/google/chromeec/i2c_tunnel/i2c_tunnel.c | 2 | ||||
-rw-r--r-- | src/ec/google/chromeec/mux/conn/conn.c | 2 | ||||
-rw-r--r-- | src/ec/google/chromeec/mux/mux.c | 2 | ||||
-rw-r--r-- | src/ec/google/wilco/chip.c | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/src/ec/google/chromeec/audio_codec/audio_codec.c b/src/ec/google/chromeec/audio_codec/audio_codec.c index 53037eb01b..a8def98da7 100644 --- a/src/ec/google/chromeec/audio_codec/audio_codec.c +++ b/src/ec/google/chromeec/audio_codec/audio_codec.c @@ -59,6 +59,6 @@ static void crosec_audio_codec_enable(struct device *dev) } struct chip_operations ec_google_chromeec_audio_codec_ops = { - CHIP_NAME("CrosEC Audio Codec Device") + .name = "CrosEC Audio Codec Device", .enable_dev = crosec_audio_codec_enable }; diff --git a/src/ec/google/chromeec/ec_lpc.c b/src/ec/google/chromeec/ec_lpc.c index 080b95da44..2a9eabbe7e 100644 --- a/src/ec/google/chromeec/ec_lpc.c +++ b/src/ec/google/chromeec/ec_lpc.c @@ -451,7 +451,7 @@ static void enable_dev(struct device *dev) } struct chip_operations ec_google_chromeec_ops = { - CHIP_NAME("Google Chrome EC") + .name = "Google Chrome EC", .enable_dev = enable_dev, }; diff --git a/src/ec/google/chromeec/i2c_tunnel/i2c_tunnel.c b/src/ec/google/chromeec/i2c_tunnel/i2c_tunnel.c index e61ecfd8c1..64812d4e8d 100644 --- a/src/ec/google/chromeec/i2c_tunnel/i2c_tunnel.c +++ b/src/ec/google/chromeec/i2c_tunnel/i2c_tunnel.c @@ -65,6 +65,6 @@ static void crosec_i2c_tunnel_enable(struct device *dev) } struct chip_operations ec_google_chromeec_i2c_tunnel_ops = { - CHIP_NAME("CrosEC I2C Tunnel Device") + .name = "CrosEC I2C Tunnel Device", .enable_dev = crosec_i2c_tunnel_enable }; diff --git a/src/ec/google/chromeec/mux/conn/conn.c b/src/ec/google/chromeec/mux/conn/conn.c index e179c33307..bb3129bfb7 100644 --- a/src/ec/google/chromeec/mux/conn/conn.c +++ b/src/ec/google/chromeec/mux/conn/conn.c @@ -52,6 +52,6 @@ static void conn_enable(struct device *dev) } struct chip_operations ec_google_chromeec_mux_conn_ops = { - CHIP_NAME("CrosEC Type C Mux device") + .name = "CrosEC Type C Mux device", .enable_dev = conn_enable, }; diff --git a/src/ec/google/chromeec/mux/mux.c b/src/ec/google/chromeec/mux/mux.c index 9324d2e4f2..62be23842a 100644 --- a/src/ec/google/chromeec/mux/mux.c +++ b/src/ec/google/chromeec/mux/mux.c @@ -36,6 +36,6 @@ static void mux_enable(struct device *dev) } struct chip_operations ec_google_chromeec_mux_ops = { - CHIP_NAME("CrosEC Type C Mux device") + .name = "CrosEC Type C Mux device", .enable_dev = mux_enable }; diff --git a/src/ec/google/wilco/chip.c b/src/ec/google/wilco/chip.c index 88d416da24..3c70294d06 100644 --- a/src/ec/google/wilco/chip.c +++ b/src/ec/google/wilco/chip.c @@ -230,6 +230,6 @@ static void wilco_ec_enable_dev(struct device *dev) } struct chip_operations ec_google_wilco_ops = { - CHIP_NAME("Google Wilco EC") + .name = "Google Wilco EC", .enable_dev = wilco_ec_enable_dev, }; |