aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/can/mscan/mscan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/can/mscan/mscan.c')
-rw-r--r--drivers/net/can/mscan/mscan.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/net/can/mscan/mscan.c b/drivers/net/can/mscan/mscan.c
index d11b0832ccd6..41a2a2dda7ea 100644
--- a/drivers/net/can/mscan/mscan.c
+++ b/drivers/net/can/mscan/mscan.c
@@ -95,9 +95,9 @@ static int mscan_set_mode(struct net_device *dev, u8 mode)
95 * any, at once. 95 * any, at once.
96 */ 96 */
97 if (i >= MSCAN_SET_MODE_RETRIES) 97 if (i >= MSCAN_SET_MODE_RETRIES)
98 dev_dbg(dev->dev.parent, 98 netdev_dbg(dev,
99 "device failed to enter sleep mode. " 99 "device failed to enter sleep mode. "
100 "We proceed anyhow.\n"); 100 "We proceed anyhow.\n");
101 else 101 else
102 priv->can.state = CAN_STATE_SLEEPING; 102 priv->can.state = CAN_STATE_SLEEPING;
103 } 103 }
@@ -213,7 +213,7 @@ static netdev_tx_t mscan_start_xmit(struct sk_buff *skb, struct net_device *dev)
213 switch (hweight8(i)) { 213 switch (hweight8(i)) {
214 case 0: 214 case 0:
215 netif_stop_queue(dev); 215 netif_stop_queue(dev);
216 dev_err(dev->dev.parent, "Tx Ring full when queue awake!\n"); 216 netdev_err(dev, "Tx Ring full when queue awake!\n");
217 return NETDEV_TX_BUSY; 217 return NETDEV_TX_BUSY;
218 case 1: 218 case 1:
219 /* 219 /*
@@ -352,7 +352,7 @@ static void mscan_get_err_frame(struct net_device *dev, struct can_frame *frame,
352 struct net_device_stats *stats = &dev->stats; 352 struct net_device_stats *stats = &dev->stats;
353 enum can_state old_state; 353 enum can_state old_state;
354 354
355 dev_dbg(dev->dev.parent, "error interrupt (canrflg=%#x)\n", canrflg); 355 netdev_dbg(dev, "error interrupt (canrflg=%#x)\n", canrflg);
356 frame->can_id = CAN_ERR_FLAG; 356 frame->can_id = CAN_ERR_FLAG;
357 357
358 if (canrflg & MSCAN_OVRIF) { 358 if (canrflg & MSCAN_OVRIF) {
@@ -427,7 +427,7 @@ static int mscan_rx_poll(struct napi_struct *napi, int quota)
427 skb = alloc_can_skb(dev, &frame); 427 skb = alloc_can_skb(dev, &frame);
428 if (!skb) { 428 if (!skb) {
429 if (printk_ratelimit()) 429 if (printk_ratelimit())
430 dev_notice(dev->dev.parent, "packet dropped\n"); 430 netdev_notice(dev, "packet dropped\n");
431 stats->rx_dropped++; 431 stats->rx_dropped++;
432 out_8(&regs->canrflg, canrflg); 432 out_8(&regs->canrflg, canrflg);
433 continue; 433 continue;
@@ -551,8 +551,7 @@ static int mscan_do_set_bittiming(struct net_device *dev)
551 BTR1_SET_TSEG2(bt->phase_seg2) | 551 BTR1_SET_TSEG2(bt->phase_seg2) |
552 BTR1_SET_SAM(priv->can.ctrlmode & CAN_CTRLMODE_3_SAMPLES)); 552 BTR1_SET_SAM(priv->can.ctrlmode & CAN_CTRLMODE_3_SAMPLES));
553 553
554 dev_info(dev->dev.parent, "setting BTR0=0x%02x BTR1=0x%02x\n", 554 netdev_info(dev, "setting BTR0=0x%02x BTR1=0x%02x\n", btr0, btr1);
555 btr0, btr1);
556 555
557 out_8(&regs->canbtr0, btr0); 556 out_8(&regs->canbtr0, btr0);
558 out_8(&regs->canbtr1, btr1); 557 out_8(&regs->canbtr1, btr1);
@@ -587,7 +586,7 @@ static int mscan_open(struct net_device *dev)
587 586
588 ret = request_irq(dev->irq, mscan_isr, 0, dev->name, dev); 587 ret = request_irq(dev->irq, mscan_isr, 0, dev->name, dev);
589 if (ret < 0) { 588 if (ret < 0) {
590 dev_err(dev->dev.parent, "failed to attach interrupt\n"); 589 netdev_err(dev, "failed to attach interrupt\n");
591 goto exit_napi_disable; 590 goto exit_napi_disable;
592 } 591 }
593 592