]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Input: pixcir_i2c_ts - do not print error on defer probe
authorFabio Estevam <festevam@gmail.com>
Tue, 8 Oct 2019 17:15:12 +0000 (10:15 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 9 Oct 2019 21:56:39 +0000 (14:56 -0700)
In the case of defer probe we should not print an error message.

This also aligns with how defer probe is handled in the other GPIOs
used by this driver.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Roger Quadros <rogerq@ti.com>
Tested-by: Michal Vokáč <michal.vokac@ysoft.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/pixcir_i2c_ts.c

index 5f2a3dc353c8a972c798bce9ae092556289a1d48..ec768ab6148e1ebe4a534ce832546ec8f1628843 100644 (file)
@@ -567,7 +567,9 @@ static int pixcir_i2c_ts_probe(struct i2c_client *client,
        tsdata->gpio_attb = devm_gpiod_get(dev, "attb", GPIOD_IN);
        if (IS_ERR(tsdata->gpio_attb)) {
                error = PTR_ERR(tsdata->gpio_attb);
-               dev_err(dev, "Failed to request ATTB gpio: %d\n", error);
+               if (error != -EPROBE_DEFER)
+                       dev_err(dev, "Failed to request ATTB gpio: %d\n",
+                               error);
                return error;
        }
 
@@ -575,7 +577,9 @@ static int pixcir_i2c_ts_probe(struct i2c_client *client,
                                                     GPIOD_OUT_LOW);
        if (IS_ERR(tsdata->gpio_reset)) {
                error = PTR_ERR(tsdata->gpio_reset);
-               dev_err(dev, "Failed to request RESET gpio: %d\n", error);
+               if (error != -EPROBE_DEFER)
+                       dev_err(dev, "Failed to request RESET gpio: %d\n",
+                               error);
                return error;
        }