Skip to content

Commit

Permalink
Input: hideep - switch to use device_property_count_u32()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andy Shevchenko authored and Dmitry Torokhov committed Aug 12, 2019
1 parent 6e57ce7 commit 104c995
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/input/touchscreen/hideep.c
Original file line number Diff line number Diff line change
Expand Up @@ -811,8 +811,7 @@ static int hideep_init_input(struct hideep_ts *ts)
if (error)
return error;

ts->key_num = device_property_read_u32_array(dev, "linux,keycodes",
NULL, 0);
ts->key_num = device_property_count_u32(dev, "linux,keycodes");
if (ts->key_num > HIDEEP_KEY_MAX) {
dev_err(dev, "too many keys defined: %d\n",
ts->key_num);
Expand Down

0 comments on commit 104c995

Please sign in to comment.