Commit 1a8fc4f7 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman

pps: clients: gpio: Use dev_err_probe() to avoid log noise

When GPIO APIs return -EPROBE_DEFER there is no need to print the message,
especially taking into consideration that it may repeat several times.
Use dev_err_probe() to avoid log noise in such cases.
Acked-by: default avatarRodolfo Giometti <giometti@enneenne.com>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210318130321.24227-2-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a4780db3
...@@ -110,19 +110,16 @@ static int pps_gpio_setup(struct platform_device *pdev) ...@@ -110,19 +110,16 @@ static int pps_gpio_setup(struct platform_device *pdev)
data->gpio_pin = devm_gpiod_get(&pdev->dev, data->gpio_pin = devm_gpiod_get(&pdev->dev,
NULL, /* request "gpios" */ NULL, /* request "gpios" */
GPIOD_IN); GPIOD_IN);
if (IS_ERR(data->gpio_pin)) { if (IS_ERR(data->gpio_pin))
dev_err(&pdev->dev, return dev_err_probe(&pdev->dev, PTR_ERR(data->gpio_pin),
"failed to request PPS GPIO\n"); "failed to request PPS GPIO\n");
return PTR_ERR(data->gpio_pin);
}
data->echo_pin = devm_gpiod_get_optional(&pdev->dev, data->echo_pin = devm_gpiod_get_optional(&pdev->dev,
"echo", "echo",
GPIOD_OUT_LOW); GPIOD_OUT_LOW);
if (IS_ERR(data->echo_pin)) { if (IS_ERR(data->echo_pin))
dev_err(&pdev->dev, "failed to request ECHO GPIO\n"); return dev_err_probe(&pdev->dev, PTR_ERR(data->echo_pin),
return PTR_ERR(data->echo_pin); "failed to request ECHO GPIO\n");
}
if (data->echo_pin) { if (data->echo_pin) {
ret = of_property_read_u32(np, ret = of_property_read_u32(np,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment