From: Andy Shevchenko Date: Mon, 12 Aug 2019 06:59:51 +0000 (-0700) Subject: Input: mpr121 - switch to use device_property_count_u32() X-Git-Tag: v5.4-rc1~109^2^2~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6e57ce76d0622aa4d790edd8e49f3704c48707c9;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/keyboard/mpr121_touchkey.c b/drivers/input/keyboard/mpr121_touchkey.c index e9ceaa16b46a9..ee80de44ce3f6 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;