diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2019-03-04 08:14:44 +0100 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2019-03-04 08:14:44 +0100 |
commit | 65e91e2845b5b8965f21a856e1e0ad70c6522ce7 (patch) | |
tree | 61b1c7e22270297690f02e0c169e917a27304aef /drivers/input/keyboard/mcs_touchkey.c | |
parent | Input: elan_i2c - add ACPI ID for touchpad in Lenovo V330-15ISK (diff) | |
parent | Input: ti_am335x_tsc - remove set but not used variable 'tscadc_dev' (diff) | |
download | linux-65e91e2845b5b8965f21a856e1e0ad70c6522ce7.tar.xz linux-65e91e2845b5b8965f21a856e1e0ad70c6522ce7.zip |
Merge branch 'next' into for-linus
Prepare input updates for 5.1 merge window.
Diffstat (limited to 'drivers/input/keyboard/mcs_touchkey.c')
-rw-r--r-- | drivers/input/keyboard/mcs_touchkey.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/input/keyboard/mcs_touchkey.c b/drivers/input/keyboard/mcs_touchkey.c index be56d4f262a7..b132662201a4 100644 --- a/drivers/input/keyboard/mcs_touchkey.c +++ b/drivers/input/keyboard/mcs_touchkey.c @@ -113,9 +113,8 @@ static int mcs_touchkey_probe(struct i2c_client *client, return -EINVAL; } - data = kzalloc(sizeof(struct mcs_touchkey_data) + - sizeof(data->keycodes[0]) * (pdata->key_maxval + 1), - GFP_KERNEL); + data = kzalloc(struct_size(data, keycodes, pdata->key_maxval + 1), + GFP_KERNEL); input_dev = input_allocate_device(); if (!data || !input_dev) { dev_err(&client->dev, "Failed to allocate memory\n"); |