Skip to content

Commit

Permalink
Input: pixcir_i2c_ts - do not print error on defer probe
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fabio Estevam authored and Dmitry Torokhov committed Oct 9, 2019
1 parent 13fb9cf commit 71a8f34
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/input/touchscreen/pixcir_i2c_ts.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,15 +567,19 @@ 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;
}

tsdata->gpio_reset = devm_gpiod_get_optional(dev, "reset",
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;
}

Expand Down

0 comments on commit 71a8f34

Please sign in to comment.