summaryrefslogtreecommitdiff
path: root/src/drivers/i2c/generic
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@chromium.org>2016-10-18 15:11:32 -0700
committerFurquan Shaikh <furquan@google.com>2016-10-24 17:43:35 +0200
commit3f4e6272007483d720a7c6677e81f80810513581 (patch)
tree3831dc2422aa3c091dc74ea9c81fb8470e7ec8e1 /src/drivers/i2c/generic
parent8e641741377e2d11b23ced0a91d1e5cd66ed7434 (diff)
downloadcoreboot-3f4e6272007483d720a7c6677e81f80810513581.tar.xz
drivers/i2c/generic: Return correct name for acpi_name
Return config->name if it is not NULL. BUG=chrome-os-partner:55988 Change-Id: I9ae229949b73de6f991383daae8d962d6cf457a7 Signed-off-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://review.coreboot.org/17077 Tested-by: build bot (Jenkins) Reviewed-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/drivers/i2c/generic')
-rw-r--r--src/drivers/i2c/generic/generic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/i2c/generic/generic.c b/src/drivers/i2c/generic/generic.c
index 30a280bcff..c11a889d5b 100644
--- a/src/drivers/i2c/generic/generic.c
+++ b/src/drivers/i2c/generic/generic.c
@@ -86,7 +86,7 @@ static const char *i2c_generic_acpi_name(struct device *dev)
static char name[5];
if (config->name)
- return name;
+ return config->name;
snprintf(name, sizeof(name), "D%03.3X", dev->path.i2c.device);
name[4] = '\0';