aboutsummaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
authorSimon Glass2018-12-28 14:23:08 -0700
committerSimon Glass2019-01-14 17:47:13 -0700
commit67d1b0513079049baa3e0e38603eb33a3857af5d (patch)
tree7cfee737937dd1d74d9f60e86a808970f382b19e /arch/x86
parent0171f432047e86305593bb1eb1cc86f853e55029 (diff)
dm: serial: Adjust serial_getconfig() to use proper API
All driver-model functions should have a device as the first parameter. Update this function accordingly. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/lib/acpi_table.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c
index 79bc2000bda..bfcf2adbf12 100644
--- a/arch/x86/lib/acpi_table.c
+++ b/arch/x86/lib/acpi_table.c
@@ -342,6 +342,7 @@ static void acpi_create_spcr(struct acpi_spcr *spcr)
struct acpi_table_header *header = &(spcr->header);
struct serial_device_info serial_info = {0};
ulong serial_address, serial_offset;
+ struct udevice *dev;
uint serial_config;
uint serial_width;
int access_size;
@@ -431,7 +432,9 @@ static void acpi_create_spcr(struct acpi_spcr *spcr)
break;
}
- ret = serial_getconfig(&serial_config);
+ ret = uclass_first_device_err(UCLASS_SERIAL, &dev);
+ if (!ret)
+ ret = serial_getconfig(dev, &serial_config);
if (ret)
serial_config = SERIAL_DEFAULT_CONFIG;