Commit 104c995f authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Dmitry Torokhov

Input: hideep - switch to use device_property_count_u32()

Use use device_property_count_u32() directly, that makes code neater.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 6e57ce76
...@@ -811,8 +811,7 @@ static int hideep_init_input(struct hideep_ts *ts) ...@@ -811,8 +811,7 @@ static int hideep_init_input(struct hideep_ts *ts)
if (error) if (error)
return error; return error;
ts->key_num = device_property_read_u32_array(dev, "linux,keycodes", ts->key_num = device_property_count_u32(dev, "linux,keycodes");
NULL, 0);
if (ts->key_num > HIDEEP_KEY_MAX) { if (ts->key_num > HIDEEP_KEY_MAX) {
dev_err(dev, "too many keys defined: %d\n", dev_err(dev, "too many keys defined: %d\n",
ts->key_num); ts->key_num);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment