From 86dce8fa75233c9e6639962e0f402adcd6530e66 Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Thu, 19 Nov 2020 18:29:44 -0600 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/47781 Reviewed-by: Furquan Shaikh Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) --- src/drivers/i2c/generic/generic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/drivers/i2c/generic') 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 */ -- cgit v1.2.3