Commit 9ed05c94 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Dmitry Torokhov

Input: atmel_mxt_ts - 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 104c995f
......@@ -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",
......
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