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>
This commit is contained in:
parent
8e64174137
commit
3f4e627200
|
@ -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';
|
||||
|
|
Loading…
Reference in New Issue