1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 08:42:12 +02:00

cros: Adjust board_get_cros_ec_dev() to return a udevice

Rather than returning what is effectively an internal data structure,
return the cros EC device itself.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2018-10-01 12:22:23 -06:00
parent 6322a7b63f
commit 42116f644b
2 changed files with 3 additions and 5 deletions

View File

@@ -13,7 +13,7 @@
#include <dm.h>
#include <errno.h>
struct cros_ec_dev *board_get_cros_ec_dev(void)
struct udevice *board_get_cros_ec_dev(void)
{
struct udevice *dev;
int ret;
@@ -23,7 +23,7 @@ struct cros_ec_dev *board_get_cros_ec_dev(void)
debug("%s: Error %d\n", __func__, ret);
return NULL;
}
return dev_get_uclass_priv(dev);
return dev;
}
int cros_ec_get_error(void)