diff options
author | Simon Glass <sjg@chromium.org> | 2018-11-06 15:21:26 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2018-11-20 19:14:22 -0700 |
commit | a2a63a35b2ad6da434aaf8426f2902c6c3bc2352 (patch) | |
tree | 2247fcc7750fcc4a1dac03564fc09af26e1817f7 /board/samsung | |
parent | 566bf3a8698780079196da742c363ca3b627ca31 (diff) |
sandbox: cros_ec: exynos: Drop use of cros_ec_get_error()
This function is really just a call to uclass_get_device() and there is no
reason why the caller cannot do it. Update sandbox and snow accordingly.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'board/samsung')
-rw-r--r-- | board/samsung/common/board.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c index c4b6baedf0..6fd26a3a91 100644 --- a/board/samsung/common/board.c +++ b/board/samsung/common/board.c @@ -306,14 +306,16 @@ int checkboard(void) #ifdef CONFIG_BOARD_LATE_INIT int board_late_init(void) { - stdio_print_current_devices(); + struct udevice *dev; + int ret; - if (cros_ec_get_error()) { + stdio_print_current_devices(); + ret = uclass_first_device_err(UCLASS_CROS_EC, &dev); + if (ret && ret != -ENODEV) { /* Force console on */ gd->flags &= ~GD_FLG_SILENT; - printf("cros-ec communications failure %d\n", - cros_ec_get_error()); + printf("cros-ec communications failure %d\n", ret); puts("\nPlease reset with Power+Refresh\n\n"); panic("Cannot init cros-ec device"); return -1; |