diff options
author | Simon Glass <sjg@chromium.org> | 2018-12-28 14:23:10 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2019-01-14 17:47:13 -0700 |
commit | a61cbad78e67963944e7d719f0aee27b8aef6c02 (patch) | |
tree | 5b274a956002e4d7c37e19ae63293015be15f9bc /test/dm | |
parent | 3de04e771c4b230ad08c7b22871dedf5f69032b9 (diff) |
dm: serial: Adjust serial_getinfo() 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 'test/dm')
-rw-r--r-- | test/dm/serial.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/dm/serial.c b/test/dm/serial.c index f82b4a19e8..3d741a8c36 100644 --- a/test/dm/serial.c +++ b/test/dm/serial.c @@ -26,14 +26,14 @@ static int dm_test_serial(struct unit_test_state *uts) ut_assertok(serial_setconfig(dev_serial, SERIAL_DEFAULT_CONFIG)); ut_assertok(serial_getconfig(dev_serial, &value_serial)); ut_assert(value_serial == SERIAL_DEFAULT_CONFIG); - ut_assertok(serial_getinfo(&info_serial)); + ut_assertok(serial_getinfo(dev_serial, &info_serial)); ut_assert(info_serial.type == SERIAL_CHIP_UNKNOWN); ut_assert(info_serial.addr == SERIAL_DEFAULT_ADDRESS); /* * test with a parameter which is NULL pointer */ ut_asserteq(-EINVAL, serial_getconfig(dev_serial, NULL)); - ut_asserteq(-EINVAL, serial_getinfo(NULL)); + ut_asserteq(-EINVAL, serial_getinfo(dev_serial, NULL)); /* * test with a serial config which is not supported by * sandbox_serial driver: test with wrong parity |