diff options
author | Matt DeVillier <matt.devillier@puri.sm> | 2020-11-19 18:29:44 -0600 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-11-22 22:22:00 +0000 |
commit | 86dce8fa75233c9e6639962e0f402adcd6530e66 (patch) | |
tree | 6408e7a085b1ba6bea313e381149e4d12a50680a | |
parent | 9226fe9aee7c06bce69881ca41393fdc8964f08f (diff) |
drivers/i2c/generic: Only write DDN field if description not empty
DDN field isn't required, no point in writing an empty string to it.
Change-Id: Ifea6e48c324598f114178e86a79f519ee35f5258
Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47781
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r-- | src/drivers/i2c/generic/generic.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drivers/i2c/generic/generic.c b/src/drivers/i2c/generic/generic.c index cd7406893b..1c7267e897 100644 --- a/src/drivers/i2c/generic/generic.c +++ b/src/drivers/i2c/generic/generic.c @@ -72,7 +72,8 @@ void i2c_generic_fill_ssdt(const struct device *dev, if (config->cid) acpigen_write_name_string("_CID", config->cid); acpigen_write_name_integer("_UID", config->uid); - acpigen_write_name_string("_DDN", config->desc); + if (config->desc) + acpigen_write_name_string("_DDN", config->desc); acpigen_write_STA(acpi_device_status(dev)); /* Resources */ |