From: Jes Sorensen Date: Mon, 29 Feb 2016 22:05:49 +0000 (-0500) Subject: rtl8xxxu: Print a warning if flushing the FIFO fails X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=145428ec7c6794c3ac78ddce2b073076c9c870d2;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git rtl8xxxu: Print a warning if flushing the FIFO fails Only print a warning if the FIFO flush fails, as opposed to printing the status unconditionally. Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c index e444e2b91f40..5c08db745d0f 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c @@ -5689,6 +5689,7 @@ static int rtl8xxxu_emu_to_disabled(struct rtl8xxxu_priv *priv) static int rtl8xxxu_flush_fifo(struct rtl8xxxu_priv *priv) { + struct device *dev = &priv->udev->dev; u32 val32; int retry, retval; @@ -5712,7 +5713,9 @@ static int rtl8xxxu_flush_fifo(struct rtl8xxxu_priv *priv) rtl8xxxu_write16(priv, REG_RQPN_NPQ, 0); rtl8xxxu_write32(priv, REG_RQPN, 0x80000000); mdelay(2); - pr_info("%s: retry %i\n", __func__, retry); + + if (!retry) + dev_warn(dev, "Failed to flush FIFO\n"); return retval; }