Input: matrix-keymap - switch to use device_property_count_u32()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 12 Aug 2019 07:00:55 +0000 (00:00 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 12 Aug 2019 07:03:13 +0000 (00:03 -0700)
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>
drivers/input/matrix-keymap.c

index da312be94c3adb81419330bc8ce7cc19dae7bd74..4fa53423f56c21376ba292511c8aa9dc9bcd5882 100644 (file)
@@ -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);