summaryrefslogtreecommitdiffstats
path: root/drivers/pwm
diff options
context:
space:
mode:
authorNick Vaccaro <nvaccaro@google.com>2017-06-23 14:52:47 -0700
committerThierry Reding <thierry.reding@gmail.com>2017-07-06 17:16:37 +0200
commite47866a177cf0baba1d714fa93cb762f25bd6cef (patch)
tree1b19d6bc7dd7632680c66e3a5a773117919cd8d8 /drivers/pwm
parentfd7b2be8cbcf6cd6d9c9e843ffff36fb91388e51 (diff)
downloadlinux-e47866a177cf0baba1d714fa93cb762f25bd6cef.tar.gz
linux-e47866a177cf0baba1d714fa93cb762f25bd6cef.tar.bz2
linux-e47866a177cf0baba1d714fa93cb762f25bd6cef.zip
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')
-rw-r--r--drivers/pwm/pwm-cros-ec.c4
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,
msg->version = 0;
msg->command = EC_CMD_PWM_GET_DUTY;
- msg->insize = sizeof(*params);
- msg->outsize = sizeof(*resp);
+ msg->insize = sizeof(*resp);
+ msg->outsize = sizeof(*params);
params->pwm_type = EC_PWM_TYPE_GENERIC;
params->index = index;