Commit b5894d12 authored by Hans de Goede's avatar Hans de Goede Committed by Linus Walleij

pinctrl: baytrail: Do not call WARN_ON for a firmware bug

WARN_ON causes a backtrace to get logged which is only useful for
kernel bugs. For signalling a firmware bug dev_warn(dev, FW_BUG "...")
should be used.

This fixes users running userspace software to monitor kernel oopses
getting a false positive bug-report every boot because of the wrong
use of WARN_ON.
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Acked-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 26d1f438
...@@ -981,12 +981,12 @@ static int byt_gpio_request_enable(struct pinctrl_dev *pctl_dev, ...@@ -981,12 +981,12 @@ static int byt_gpio_request_enable(struct pinctrl_dev *pctl_dev,
*/ */
value = readl(reg) & BYT_PIN_MUX; value = readl(reg) & BYT_PIN_MUX;
gpio_mux = byt_get_gpio_mux(vg, offset); gpio_mux = byt_get_gpio_mux(vg, offset);
if (WARN_ON(gpio_mux != value)) { if (gpio_mux != value) {
value = readl(reg) & ~BYT_PIN_MUX; value = readl(reg) & ~BYT_PIN_MUX;
value |= gpio_mux; value |= gpio_mux;
writel(value, reg); writel(value, reg);
dev_warn(&vg->pdev->dev, dev_warn(&vg->pdev->dev, FW_BUG
"pin %u forcibly re-configured as GPIO\n", offset); "pin %u forcibly re-configured as GPIO\n", offset);
} }
......
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