Only print a warning if the FIFO flush fails, as opposed to printing
the status unconditionally.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
static int rtl8xxxu_flush_fifo(struct rtl8xxxu_priv *priv)
{
+ struct device *dev = &priv->udev->dev;
u32 val32;
int retry, retval;
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;
}