diff options
author | Nick Vaccaro <nvaccaro@google.com> | 2017-06-23 17:52:47 -0400 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2017-07-06 11:16:37 -0400 |
commit | e47866a177cf0baba1d714fa93cb762f25bd6cef (patch) | |
tree | 1b19d6bc7dd7632680c66e3a5a773117919cd8d8 /drivers/pwm/pwm-cros-ec.c | |
parent | fd7b2be8cbcf6cd6d9c9e843ffff36fb91388e51 (diff) |
pwm: cros-ec: Fix transposed param settings
The __cros_ec_pwm_get_duty() routine was transposing the insize and
outsize fields when calling cros_ec_cmd_xfer_status().
The original code worked without error due to size of the two particular
parameter blocks passed to cros_ec_cmd_xfer_status(), so this change is
not fixing an actual runtime problem, just correcting the calling usage.
Signed-off-by: Nick Vaccaro <nvaccaro@chromium.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm/pwm-cros-ec.c')
-rw-r--r-- | drivers/pwm/pwm-cros-ec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pwm/pwm-cros-ec.c b/drivers/pwm/pwm-cros-ec.c index f6ca4e8c6253..9c13694eaa24 100644 --- a/drivers/pwm/pwm-cros-ec.c +++ b/drivers/pwm/pwm-cros-ec.c | |||
@@ -75,8 +75,8 @@ static int __cros_ec_pwm_get_duty(struct cros_ec_device *ec, u8 index, | |||
75 | 75 | ||
76 | msg->version = 0; | 76 | msg->version = 0; |
77 | msg->command = EC_CMD_PWM_GET_DUTY; | 77 | msg->command = EC_CMD_PWM_GET_DUTY; |
78 | msg->insize = sizeof(*params); | 78 | msg->insize = sizeof(*resp); |
79 | msg->outsize = sizeof(*resp); | 79 | msg->outsize = sizeof(*params); |
80 | 80 | ||
81 | params->pwm_type = EC_PWM_TYPE_GENERIC; | 81 | params->pwm_type = EC_PWM_TYPE_GENERIC; |
82 | params->index = index; | 82 | params->index = index; |