@@ -223,6 +223,7 @@ int brcmf_c_preinit_dcmds(struct brcmf_if *ifp)
#ifndef CONFIG_BRCM_TRACING
void __brcmf_err(struct brcmf_pub *pub, const char *func, const char *fmt, ...)
{
+ struct device *dev = pub && pub->bus_if ? pub->bus_if->dev : NULL;
struct va_format vaf;
va_list args;
@@ -230,7 +231,7 @@ void __brcmf_err(struct brcmf_pub *pub, const char *func, const char *fmt, ...)
vaf.fmt = fmt;
vaf.va = &args;
- pr_err("%s: %pV", func, &vaf);
+ dev_err(dev, "%s: %pV", func, &vaf);
va_end(args);
}
@@ -25,6 +25,7 @@
void __brcmf_err(struct brcmf_pub *pub, const char *func, const char *fmt, ...)
{
+ struct device *dev = pub && pub->bus_if ? pub->bus_if->dev : NULL;
struct va_format vaf = {
.fmt = fmt,
};
@@ -32,7 +33,7 @@ void __brcmf_err(struct brcmf_pub *pub, const char *func, const char *fmt, ...)
va_start(args, fmt);
vaf.va = &args;
- pr_err("%s: %pV", func, &vaf);
+ dev_err(dev, "%s: %pV", func, &vaf);
trace_brcmf_err(func, &vaf);
va_end(args);
}