projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
moveconfig: replace unsafe eval with asteval
[oweals/u-boot.git]
/
drivers
/
misc
/
cros_ec.c
diff --git
a/drivers/misc/cros_ec.c
b/drivers/misc/cros_ec.c
index 2dcdb3d8d6100c00559906dce287544e60483c63..fa9984f6bd90deee71d42f0c42cc1c47467bec46 100644
(file)
--- a/
drivers/misc/cros_ec.c
+++ b/
drivers/misc/cros_ec.c
@@
-313,7
+313,7
@@
static int send_command(struct cros_ec_dev *dev, uint cmd, int cmd_version,
* @param din_len Maximum size of response in bytes
* @return number of bytes in response, or -ve on error
*/
* @param din_len Maximum size of response in bytes
* @return number of bytes in response, or -ve on error
*/
-static int ec_command_inptr(struct udevice *dev, uint
8_t
cmd,
+static int ec_command_inptr(struct udevice *dev, uint cmd,
int cmd_version, const void *dout, int dout_len,
uint8_t **dinp, int din_len)
{
int cmd_version, const void *dout, int dout_len,
uint8_t **dinp, int din_len)
{
@@
-420,7
+420,7
@@
int cros_ec_read_id(struct udevice *dev, char *id, int maxlen)
ret = ec_command_inptr(dev, EC_CMD_GET_VERSION, 0, NULL, 0,
(uint8_t **)&r, sizeof(*r));
if (ret != sizeof(*r)) {
ret = ec_command_inptr(dev, EC_CMD_GET_VERSION, 0, NULL, 0,
(uint8_t **)&r, sizeof(*r));
if (ret != sizeof(*r)) {
- log_err("Got rc %d, expected %
d\n", ret,
sizeof(*r));
+ log_err("Got rc %d, expected %
u\n", ret, (uint)
sizeof(*r));
return -1;
}
return -1;
}
@@
-1466,7
+1466,7
@@
int cros_ec_set_lid_shutdown_mask(struct udevice *dev, int enable)
if (ret < 0)
return ret;
if (ret < 0)
return ret;
- /
/ Set lid close event state in the EC SMI event mask
+ /
* Set lid close event state in the EC SMI event mask */
if (enable)
mask |= EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_CLOSED);
else
if (enable)
mask |= EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_CLOSED);
else
@@
-1482,7
+1482,7
@@
int cros_ec_set_lid_shutdown_mask(struct udevice *dev, int enable)
UCLASS_DRIVER(cros_ec) = {
.id = UCLASS_CROS_EC,
UCLASS_DRIVER(cros_ec) = {
.id = UCLASS_CROS_EC,
- .name = "cros
_
ec",
+ .name = "cros
-
ec",
.per_device_auto_alloc_size = sizeof(struct cros_ec_dev),
.post_bind = dm_scan_fdt_dev,
.flags = DM_UC_FLAG_ALLOC_PRIV_DMA,
.per_device_auto_alloc_size = sizeof(struct cros_ec_dev),
.post_bind = dm_scan_fdt_dev,
.flags = DM_UC_FLAG_ALLOC_PRIV_DMA,