summaryrefslogtreecommitdiff
path: root/drivers/input/keyboard
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2014-08-15 10:02:58 +0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-08-15 10:02:58 +0400
commit91167e1914673972511617b6f4165bb12c3e0dcf (patch)
tree0d8d2b997d3aef7dc23eaabadef51ab29de88d23 /drivers/input/keyboard
parenta6b48699ae50ccce700506ced863ba1f5ce2af11 (diff)
parent3361a97601f243f1842bee6ca709e399f47b2ce3 (diff)
downloadlinux-91167e1914673972511617b6f4165bb12c3e0dcf.tar.xz
Merge branch 'next' into for-linus
Prepare second round of input updates for 3.17.
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r--drivers/input/keyboard/cap1106.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/input/keyboard/cap1106.c b/drivers/input/keyboard/cap1106.c
index f7d7a0d4ab4e..180b184ab90f 100644
--- a/drivers/input/keyboard/cap1106.c
+++ b/drivers/input/keyboard/cap1106.c
@@ -64,7 +64,7 @@ struct cap1106_priv {
struct input_dev *idev;
/* config */
- unsigned int keycodes[CAP1106_NUM_CHN];
+ unsigned short keycodes[CAP1106_NUM_CHN];
};
static const struct reg_default cap1106_reg_defaults[] = {
@@ -272,6 +272,12 @@ static int cap1106_i2c_probe(struct i2c_client *i2c_client,
for (i = 0; i < CAP1106_NUM_CHN; i++)
__set_bit(priv->keycodes[i], priv->idev->keybit);
+ __clear_bit(KEY_RESERVED, priv->idev->keybit);
+
+ priv->idev->keycode = priv->keycodes;
+ priv->idev->keycodesize = sizeof(priv->keycodes[0]);
+ priv->idev->keycodemax = ARRAY_SIZE(priv->keycodes);
+
priv->idev->id.vendor = CAP1106_MANUFACTURER_ID;
priv->idev->id.product = CAP1106_PRODUCT_ID;
priv->idev->id.version = rev;