aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/can/sja1000/sja1000.c
diff options
context:
space:
mode:
authorWolfgang Grandegger <wg@grandegger.com>2012-02-01 05:02:05 -0500
committerMarc Kleine-Budde <mkl@pengutronix.de>2012-02-02 19:21:26 -0500
commitaabdfd6adb804d0aaba0188ade0f1afe42a52e31 (patch)
treeb329ab5b070c5340f60bc1d125e1655d340ee457 /drivers/net/can/sja1000/sja1000.c
parent79d0d8a7d5edca459f544c2ad75088e99307795e (diff)
can: replace the dev_dbg/info/err/... with the new netdev_xxx macros
Cc: uclinux-dist-devel@blackfin.uclinux.org Cc: Anant Gole <anantgole@ti.com> Cc: Chris Elston <celston@katalix.com> Cc: Sebastian Haas <haas@ems-wuensche.com> Cc: Matthias Fuchs <matthias.fuchs@esd.eu> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Sebastian Haas <dev@sebastianhaas.info> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/sja1000/sja1000.c')
-rw-r--r--drivers/net/can/sja1000/sja1000.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/net/can/sja1000/sja1000.c b/drivers/net/can/sja1000/sja1000.c
index 04a3f1b756a8..ebbcfcafe29b 100644
--- a/drivers/net/can/sja1000/sja1000.c
+++ b/drivers/net/can/sja1000/sja1000.c
@@ -128,7 +128,7 @@ static void set_reset_mode(struct net_device *dev)
128 status = priv->read_reg(priv, REG_MOD); 128 status = priv->read_reg(priv, REG_MOD);
129 } 129 }
130 130
131 dev_err(dev->dev.parent, "setting SJA1000 into reset mode failed!\n"); 131 netdev_err(dev, "setting SJA1000 into reset mode failed!\n");
132} 132}
133 133
134static void set_normal_mode(struct net_device *dev) 134static void set_normal_mode(struct net_device *dev)
@@ -156,7 +156,7 @@ static void set_normal_mode(struct net_device *dev)
156 status = priv->read_reg(priv, REG_MOD); 156 status = priv->read_reg(priv, REG_MOD);
157 } 157 }
158 158
159 dev_err(dev->dev.parent, "setting SJA1000 into normal mode failed!\n"); 159 netdev_err(dev, "setting SJA1000 into normal mode failed!\n");
160} 160}
161 161
162static void sja1000_start(struct net_device *dev) 162static void sja1000_start(struct net_device *dev)
@@ -209,8 +209,7 @@ static int sja1000_set_bittiming(struct net_device *dev)
209 if (priv->can.ctrlmode & CAN_CTRLMODE_3_SAMPLES) 209 if (priv->can.ctrlmode & CAN_CTRLMODE_3_SAMPLES)
210 btr1 |= 0x80; 210 btr1 |= 0x80;
211 211
212 dev_info(dev->dev.parent, 212 netdev_info(dev, "setting BTR0=0x%02x BTR1=0x%02x\n", btr0, btr1);
213 "setting BTR0=0x%02x BTR1=0x%02x\n", btr0, btr1);
214 213
215 priv->write_reg(priv, REG_BTR0, btr0); 214 priv->write_reg(priv, REG_BTR0, btr0);
216 priv->write_reg(priv, REG_BTR1, btr1); 215 priv->write_reg(priv, REG_BTR1, btr1);
@@ -378,7 +377,7 @@ static int sja1000_err(struct net_device *dev, uint8_t isrc, uint8_t status)
378 377
379 if (isrc & IRQ_DOI) { 378 if (isrc & IRQ_DOI) {
380 /* data overrun interrupt */ 379 /* data overrun interrupt */
381 dev_dbg(dev->dev.parent, "data overrun interrupt\n"); 380 netdev_dbg(dev, "data overrun interrupt\n");
382 cf->can_id |= CAN_ERR_CRTL; 381 cf->can_id |= CAN_ERR_CRTL;
383 cf->data[1] = CAN_ERR_CRTL_RX_OVERFLOW; 382 cf->data[1] = CAN_ERR_CRTL_RX_OVERFLOW;
384 stats->rx_over_errors++; 383 stats->rx_over_errors++;
@@ -388,7 +387,7 @@ static int sja1000_err(struct net_device *dev, uint8_t isrc, uint8_t status)
388 387
389 if (isrc & IRQ_EI) { 388 if (isrc & IRQ_EI) {
390 /* error warning interrupt */ 389 /* error warning interrupt */
391 dev_dbg(dev->dev.parent, "error warning interrupt\n"); 390 netdev_dbg(dev, "error warning interrupt\n");
392 391
393 if (status & SR_BS) { 392 if (status & SR_BS) {
394 state = CAN_STATE_BUS_OFF; 393 state = CAN_STATE_BUS_OFF;
@@ -429,7 +428,7 @@ static int sja1000_err(struct net_device *dev, uint8_t isrc, uint8_t status)
429 } 428 }
430 if (isrc & IRQ_EPI) { 429 if (isrc & IRQ_EPI) {
431 /* error passive interrupt */ 430 /* error passive interrupt */
432 dev_dbg(dev->dev.parent, "error passive interrupt\n"); 431 netdev_dbg(dev, "error passive interrupt\n");
433 if (status & SR_ES) 432 if (status & SR_ES)
434 state = CAN_STATE_ERROR_PASSIVE; 433 state = CAN_STATE_ERROR_PASSIVE;
435 else 434 else
@@ -437,7 +436,7 @@ static int sja1000_err(struct net_device *dev, uint8_t isrc, uint8_t status)
437 } 436 }
438 if (isrc & IRQ_ALI) { 437 if (isrc & IRQ_ALI) {
439 /* arbitration lost interrupt */ 438 /* arbitration lost interrupt */
440 dev_dbg(dev->dev.parent, "arbitration lost interrupt\n"); 439 netdev_dbg(dev, "arbitration lost interrupt\n");
441 alc = priv->read_reg(priv, REG_ALC); 440 alc = priv->read_reg(priv, REG_ALC);
442 priv->can.can_stats.arbitration_lost++; 441 priv->can.can_stats.arbitration_lost++;
443 stats->tx_errors++; 442 stats->tx_errors++;
@@ -495,7 +494,7 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id)
495 status = priv->read_reg(priv, REG_SR); 494 status = priv->read_reg(priv, REG_SR);
496 495
497 if (isrc & IRQ_WUI) 496 if (isrc & IRQ_WUI)
498 dev_warn(dev->dev.parent, "wakeup interrupt\n"); 497 netdev_warn(dev, "wakeup interrupt\n");
499 498
500 if (isrc & IRQ_TI) { 499 if (isrc & IRQ_TI) {
501 /* transmission complete interrupt */ 500 /* transmission complete interrupt */
@@ -522,7 +521,7 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id)
522 priv->post_irq(priv); 521 priv->post_irq(priv);
523 522
524 if (n >= SJA1000_MAX_IRQ) 523 if (n >= SJA1000_MAX_IRQ)
525 dev_dbg(dev->dev.parent, "%d messages handled in ISR", n); 524 netdev_dbg(dev, "%d messages handled in ISR", n);
526 525
527 return (n) ? IRQ_HANDLED : IRQ_NONE; 526 return (n) ? IRQ_HANDLED : IRQ_NONE;
528} 527}