Skip to content

Commit

Permalink
Input: matrix-keymap - 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 9ed05c9 commit 656d29c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/matrix-keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ static int matrix_keypad_parse_keymap(const char *propname,
if (!propname)
propname = "linux,keymap";

size = device_property_read_u32_array(dev, propname, NULL, 0);
size = device_property_count_u32(dev, propname);
if (size <= 0) {
dev_err(dev, "missing or malformed property %s: %d\n",
propname, size);
Expand Down

0 comments on commit 656d29c

Please sign in to comment.