Merge tag 'please-pull-pstore' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl...
[firefly-linux-kernel-4.4.55.git] / drivers / input / keyboard / tca8418_keypad.c
index 50e9c5e195e110e2f287568841cc5d9b4ff606ed..55c15304ddbce997a1027e319b81e7b3fc8ba98b 100644 (file)
@@ -288,8 +288,11 @@ static int tca8418_keypad_probe(struct i2c_client *client,
                irq_is_gpio = pdata->irq_is_gpio;
        } else {
                struct device_node *np = dev->of_node;
-               of_property_read_u32(np, "keypad,num-rows", &rows);
-               of_property_read_u32(np, "keypad,num-columns", &cols);
+               int err;
+
+               err = matrix_keypad_parse_of_params(dev, &rows, &cols);
+               if (err)
+                       return err;
                rep = of_property_read_bool(np, "keypad,autorepeat");
        }
 
@@ -384,7 +387,7 @@ static const struct i2c_device_id tca8418_id[] = {
 MODULE_DEVICE_TABLE(i2c, tca8418_id);
 
 #ifdef CONFIG_OF
-static const struct of_device_id tca8418_dt_ids[] __devinitconst = {
+static const struct of_device_id tca8418_dt_ids[] = {
        { .compatible = "ti,tca8418", },
        { }
 };