Skip to content

Commit

Permalink
Input: atmel_mxt_ts - 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 104c995 commit 9ed05c9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/input/touchscreen/atmel_mxt_ts.c
Original file line number Diff line number Diff line change
Expand Up @@ -2990,8 +2990,7 @@ static int mxt_parse_device_properties(struct mxt_data *data)
int error;

if (device_property_present(dev, keymap_property)) {
n_keys = device_property_read_u32_array(dev, keymap_property,
NULL, 0);
n_keys = device_property_count_u32(dev, keymap_property);
if (n_keys <= 0) {
error = n_keys < 0 ? n_keys : -EINVAL;
dev_err(dev, "invalid/malformed '%s' property: %d\n",
Expand Down

0 comments on commit 9ed05c9

Please sign in to comment.