summaryrefslogtreecommitdiff
path: root/drivers/input/keyboard/matrix_keypad.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/keyboard/matrix_keypad.c')
-rw-r--r--drivers/input/keyboard/matrix_keypad.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/input/keyboard/matrix_keypad.c b/drivers/input/keyboard/matrix_keypad.c
index 203310727d88..a1b037891af2 100644
--- a/drivers/input/keyboard/matrix_keypad.c
+++ b/drivers/input/keyboard/matrix_keypad.c
@@ -425,14 +425,12 @@ matrix_keypad_parse_dt(struct device *dev)
return ERR_PTR(-EINVAL);
}
- if (of_get_property(np, "linux,no-autorepeat", NULL))
- pdata->no_autorepeat = true;
+ pdata->no_autorepeat = of_property_read_bool(np, "linux,no-autorepeat");
pdata->wakeup = of_property_read_bool(np, "wakeup-source") ||
of_property_read_bool(np, "linux,wakeup"); /* legacy */
- if (of_get_property(np, "gpio-activelow", NULL))
- pdata->active_low = true;
+ pdata->active_low = of_property_read_bool(np, "gpio-activelow");
pdata->drive_inactive_cols =
of_property_read_bool(np, "drive-inactive-cols");