diff options
author | Simon Glass <sjg@chromium.org> | 2018-12-28 14:23:09 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2019-01-14 17:47:13 -0700 |
commit | 3de04e771c4b230ad08c7b22871dedf5f69032b9 (patch) | |
tree | e8e0bac50268aea26f79ff13e6b70aff85c7e46c /test | |
parent | 67d1b0513079049baa3e0e38603eb33a3857af5d (diff) | |
download | u-boot-3de04e771c4b230ad08c7b22871dedf5f69032b9.zip u-boot-3de04e771c4b230ad08c7b22871dedf5f69032b9.tar.gz u-boot-3de04e771c4b230ad08c7b22871dedf5f69032b9.tar.bz2 |
dm: serial: Adjust serial_setconfig() 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')
-rw-r--r-- | test/dm/serial.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/dm/serial.c b/test/dm/serial.c index 972755f..f82b4a1 100644 --- a/test/dm/serial.c +++ b/test/dm/serial.c @@ -23,7 +23,7 @@ static int dm_test_serial(struct unit_test_state *uts) * test with default config which is the only one supported by * sandbox_serial driver */ - ut_assertok(serial_setconfig(SERIAL_DEFAULT_CONFIG)); + 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)); @@ -39,7 +39,8 @@ static int dm_test_serial(struct unit_test_state *uts) * sandbox_serial driver: test with wrong parity */ ut_asserteq(-ENOTSUPP, - serial_setconfig(SERIAL_CONFIG(SERIAL_PAR_ODD, + serial_setconfig(dev_serial, + SERIAL_CONFIG(SERIAL_PAR_ODD, SERIAL_8_BITS, SERIAL_ONE_STOP))); /* @@ -47,7 +48,8 @@ static int dm_test_serial(struct unit_test_state *uts) * sandbox_serial driver: test with wrong bits number */ ut_asserteq(-ENOTSUPP, - serial_setconfig(SERIAL_CONFIG(SERIAL_PAR_NONE, + serial_setconfig(dev_serial, + SERIAL_CONFIG(SERIAL_PAR_NONE, SERIAL_6_BITS, SERIAL_ONE_STOP))); @@ -56,7 +58,8 @@ static int dm_test_serial(struct unit_test_state *uts) * sandbox_serial driver: test with wrong stop bits number */ ut_asserteq(-ENOTSUPP, - serial_setconfig(SERIAL_CONFIG(SERIAL_PAR_NONE, + serial_setconfig(dev_serial, + SERIAL_CONFIG(SERIAL_PAR_NONE, SERIAL_8_BITS, SERIAL_TWO_STOP))); |