Rather than returning what is effectively an internal data structure,
return the cros EC device itself.
Signed-off-by: Simon Glass <sjg@chromium.org>
#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;
debug("%s: Error %d\n", __func__, ret);
return NULL;
}
- return dev_get_uclass_priv(dev);
+ return dev;
}
int cros_ec_get_error(void)
/**
* Return a pointer to the board's CROS-EC device
*
- * This should be implemented by board files.
- *
* @return pointer to CROS-EC device, or NULL if none is available
*/
-struct cros_ec_dev *board_get_cros_ec_dev(void);
+struct udevice *board_get_cros_ec_dev(void);
struct dm_cros_ec_ops {
int (*check_version)(struct udevice *dev);