mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-04 02:26:56 +07:00
Input: matrix-keymap - switch to use device_property_count_u32()
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>
This commit is contained in:
parent
9ed05c94f2
commit
656d29ce0f
@ -81,7 +81,7 @@ static int matrix_keypad_parse_keymap(const char *propname,
|
|||||||
if (!propname)
|
if (!propname)
|
||||||
propname = "linux,keymap";
|
propname = "linux,keymap";
|
||||||
|
|
||||||
size = device_property_read_u32_array(dev, propname, NULL, 0);
|
size = device_property_count_u32(dev, propname);
|
||||||
if (size <= 0) {
|
if (size <= 0) {
|
||||||
dev_err(dev, "missing or malformed property %s: %d\n",
|
dev_err(dev, "missing or malformed property %s: %d\n",
|
||||||
propname, size);
|
propname, size);
|
||||||
|
Loading…
Reference in New Issue
Block a user