Input: Use of_property_read_bool() for boolean properties
[sfrench/cifs-2.6.git] / drivers / input / keyboard / matrix_keypad.c
index 203310727d88e08a0f44c44310653be832d51038..a1b037891af25f0b173e5bb35aed03ee1c3d907a 100644 (file)
@@ -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");