summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2019-08-11 23:59:51 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2019-08-12 00:03:10 -0700
commit6e57ce76d0622aa4d790edd8e49f3704c48707c9 (patch)
treeb8a2c86f1c4bec7bf1efd6d5b498838ee2501c8e /drivers/input
parentd99995a4f0f189731695efad4135daf04df53075 (diff)
Input: mpr121 - switch to use device_property_count_u32()
Use use device_property_count_u32() directly, that makes code neater. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/keyboard/mpr121_touchkey.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/input/keyboard/mpr121_touchkey.c b/drivers/input/keyboard/mpr121_touchkey.c
index e9ceaa16b46a..ee80de44ce3f 100644
--- a/drivers/input/keyboard/mpr121_touchkey.c
+++ b/drivers/input/keyboard/mpr121_touchkey.c
@@ -253,8 +253,7 @@ static int mpr_touchkey_probe(struct i2c_client *client,
mpr121->client = client;
mpr121->input_dev = input_dev;
- mpr121->keycount = device_property_read_u32_array(dev, "linux,keycodes",
- NULL, 0);
+ mpr121->keycount = device_property_count_u32(dev, "linux,keycodes");
if (mpr121->keycount > MPR121_MAX_KEY_COUNT) {
dev_err(dev, "too many keys defined (%d)\n", mpr121->keycount);
return -EINVAL;