net: ethernet: ti: cpts: use dev_yy() api for logs
authorGrygorii Strashko <grygorii.strashko@ti.com>
Thu, 23 Apr 2020 14:20:13 +0000 (17:20 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Apr 2020 19:50:20 +0000 (12:50 -0700)
Use dev_yy() API instead of pr_yy() for log outputs.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpts.c

index 729ce09dded9f26edf9f68629151a65041747a71..445f445185df9793e40ff787658be19d34a1e35a 100644 (file)
@@ -71,7 +71,7 @@ static int cpts_purge_events(struct cpts *cpts)
        }
 
        if (removed)
-               pr_debug("cpts: event pool cleaned up %d\n", removed);
+               dev_dbg(cpts->dev, "cpts: event pool cleaned up %d\n", removed);
        return removed ? 0 : -1;
 }
 
@@ -150,7 +150,7 @@ static int cpts_fifo_read(struct cpts *cpts, int match)
                        break;
 
                if (list_empty(&cpts->pool) && cpts_purge_events(cpts)) {
-                       pr_err("cpts: event pool empty\n");
+                       dev_warn(cpts->dev, "cpts: event pool empty\n");
                        return -1;
                }
 
@@ -178,7 +178,7 @@ static int cpts_fifo_read(struct cpts *cpts, int match)
                case CPTS_EV_HW:
                        break;
                default:
-                       pr_err("cpts: unknown event type\n");
+                       dev_err(cpts->dev, "cpts: unknown event type\n");
                        break;
                }
                if (type == match)
@@ -196,7 +196,7 @@ static u64 cpts_systim_read(const struct cyclecounter *cc)
 
        cpts_write32(cpts, TS_PUSH, ts_push);
        if (cpts_fifo_read(cpts, CPTS_EV_PUSH))
-               pr_err("cpts: unable to obtain a time stamp\n");
+               dev_err(cpts->dev, "cpts: unable to obtain a time stamp\n");
 
        list_for_each_safe(this, next, &cpts->events) {
                event = list_entry(this, struct cpts_event, list);
@@ -307,8 +307,8 @@ static long cpts_overflow_check(struct ptp_clock_info *ptp)
        }
        spin_unlock_irqrestore(&cpts->lock, flags);
 
-       pr_debug("cpts overflow check at %lld.%09ld\n",
-                (long long)ts.tv_sec, ts.tv_nsec);
+       dev_dbg(cpts->dev, "cpts overflow check at %lld.%09ld\n",
+               (long long)ts.tv_sec, ts.tv_nsec);
        return (long)delay;
 }