aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard/cros_ec_keyb.c
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2014-06-18 14:14:04 -0400
committerLee Jones <lee.jones@linaro.org>2014-07-09 09:58:18 -0400
commit5799f95a373a2752e5c732f531a6f40fe458b818 (patch)
tree70c4fcb0c05b37bab60d69dff8ce505d963fb3c4 /drivers/input/keyboard/cros_ec_keyb.c
parent533cec8f34778de10412dfabac991cf458ebf3c9 (diff)
mfd: cros_ec: cleanup: Remove EC wrapper functions
Remove the three wrapper functions that talk to the EC without passing all the desired arguments and just use the underlying communication function that passes everything in a struct intead. This is internal code refactoring only. Nothing should change. Signed-off-by: Bill Richardson <wfrichar@chromium.org> Signed-off-by: Doug Anderson <dianders@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/input/keyboard/cros_ec_keyb.c')
-rw-r--r--drivers/input/keyboard/cros_ec_keyb.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c
index 408379669d3c..b8341ab99f55 100644
--- a/drivers/input/keyboard/cros_ec_keyb.c
+++ b/drivers/input/keyboard/cros_ec_keyb.c
@@ -191,8 +191,16 @@ static void cros_ec_keyb_close(struct input_dev *dev)
191 191
192static int cros_ec_keyb_get_state(struct cros_ec_keyb *ckdev, uint8_t *kb_state) 192static int cros_ec_keyb_get_state(struct cros_ec_keyb *ckdev, uint8_t *kb_state)
193{ 193{
194 return ckdev->ec->command_recv(ckdev->ec, EC_CMD_MKBP_STATE, 194 struct cros_ec_command msg = {
195 kb_state, ckdev->cols); 195 .version = 0,
196 .command = EC_CMD_MKBP_STATE,
197 .outdata = NULL,
198 .outsize = 0,
199 .indata = kb_state,
200 .insize = ckdev->cols,
201 };
202
203 return ckdev->ec->cmd_xfer(ckdev->ec, &msg);
196} 204}
197 205
198static int cros_ec_keyb_work(struct notifier_block *nb, 206static int cros_ec_keyb_work(struct notifier_block *nb,