diff options
author | Wolfgang Grandegger <wg@grandegger.com> | 2012-02-01 05:02:05 -0500 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2012-02-02 19:21:26 -0500 |
commit | aabdfd6adb804d0aaba0188ade0f1afe42a52e31 (patch) | |
tree | b329ab5b070c5340f60bc1d125e1655d340ee457 /drivers/net/can/bfin_can.c | |
parent | 79d0d8a7d5edca459f544c2ad75088e99307795e (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/bfin_can.c')
-rw-r--r-- | drivers/net/can/bfin_can.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/drivers/net/can/bfin_can.c b/drivers/net/can/bfin_can.c index e1e7f9da3da5..3f88473423e9 100644 --- a/drivers/net/can/bfin_can.c +++ b/drivers/net/can/bfin_can.c | |||
@@ -82,8 +82,7 @@ static int bfin_can_set_bittiming(struct net_device *dev) | |||
82 | bfin_write(®->clock, clk); | 82 | bfin_write(®->clock, clk); |
83 | bfin_write(®->timing, timing); | 83 | bfin_write(®->timing, timing); |
84 | 84 | ||
85 | dev_info(dev->dev.parent, "setting CLOCK=0x%04x TIMING=0x%04x\n", | 85 | netdev_info(dev, "setting CLOCK=0x%04x TIMING=0x%04x\n", clk, timing); |
86 | clk, timing); | ||
87 | 86 | ||
88 | return 0; | 87 | return 0; |
89 | } | 88 | } |
@@ -108,8 +107,7 @@ static void bfin_can_set_reset_mode(struct net_device *dev) | |||
108 | while (!(bfin_read(®->control) & CCA)) { | 107 | while (!(bfin_read(®->control) & CCA)) { |
109 | udelay(10); | 108 | udelay(10); |
110 | if (--timeout == 0) { | 109 | if (--timeout == 0) { |
111 | dev_err(dev->dev.parent, | 110 | netdev_err(dev, "fail to enter configuration mode\n"); |
112 | "fail to enter configuration mode\n"); | ||
113 | BUG(); | 111 | BUG(); |
114 | } | 112 | } |
115 | } | 113 | } |
@@ -165,8 +163,7 @@ static void bfin_can_set_normal_mode(struct net_device *dev) | |||
165 | while (bfin_read(®->status) & CCA) { | 163 | while (bfin_read(®->status) & CCA) { |
166 | udelay(10); | 164 | udelay(10); |
167 | if (--timeout == 0) { | 165 | if (--timeout == 0) { |
168 | dev_err(dev->dev.parent, | 166 | netdev_err(dev, "fail to leave configuration mode\n"); |
169 | "fail to leave configuration mode\n"); | ||
170 | BUG(); | 167 | BUG(); |
171 | } | 168 | } |
172 | } | 169 | } |
@@ -345,7 +342,7 @@ static int bfin_can_err(struct net_device *dev, u16 isrc, u16 status) | |||
345 | 342 | ||
346 | if (isrc & RMLIS) { | 343 | if (isrc & RMLIS) { |
347 | /* data overrun interrupt */ | 344 | /* data overrun interrupt */ |
348 | dev_dbg(dev->dev.parent, "data overrun interrupt\n"); | 345 | netdev_dbg(dev, "data overrun interrupt\n"); |
349 | cf->can_id |= CAN_ERR_CRTL; | 346 | cf->can_id |= CAN_ERR_CRTL; |
350 | cf->data[1] = CAN_ERR_CRTL_RX_OVERFLOW; | 347 | cf->data[1] = CAN_ERR_CRTL_RX_OVERFLOW; |
351 | stats->rx_over_errors++; | 348 | stats->rx_over_errors++; |
@@ -353,7 +350,7 @@ static int bfin_can_err(struct net_device *dev, u16 isrc, u16 status) | |||
353 | } | 350 | } |
354 | 351 | ||
355 | if (isrc & BOIS) { | 352 | if (isrc & BOIS) { |
356 | dev_dbg(dev->dev.parent, "bus-off mode interrupt\n"); | 353 | netdev_dbg(dev, "bus-off mode interrupt\n"); |
357 | state = CAN_STATE_BUS_OFF; | 354 | state = CAN_STATE_BUS_OFF; |
358 | cf->can_id |= CAN_ERR_BUSOFF; | 355 | cf->can_id |= CAN_ERR_BUSOFF; |
359 | can_bus_off(dev); | 356 | can_bus_off(dev); |
@@ -361,13 +358,12 @@ static int bfin_can_err(struct net_device *dev, u16 isrc, u16 status) | |||
361 | 358 | ||
362 | if (isrc & EPIS) { | 359 | if (isrc & EPIS) { |
363 | /* error passive interrupt */ | 360 | /* error passive interrupt */ |
364 | dev_dbg(dev->dev.parent, "error passive interrupt\n"); | 361 | netdev_dbg(dev, "error passive interrupt\n"); |
365 | state = CAN_STATE_ERROR_PASSIVE; | 362 | state = CAN_STATE_ERROR_PASSIVE; |
366 | } | 363 | } |
367 | 364 | ||
368 | if ((isrc & EWTIS) || (isrc & EWRIS)) { | 365 | if ((isrc & EWTIS) || (isrc & EWRIS)) { |
369 | dev_dbg(dev->dev.parent, | 366 | netdev_dbg(dev, "Error Warning Transmit/Receive Interrupt\n"); |
370 | "Error Warning Transmit/Receive Interrupt\n"); | ||
371 | state = CAN_STATE_ERROR_WARNING; | 367 | state = CAN_STATE_ERROR_WARNING; |
372 | } | 368 | } |
373 | 369 | ||
@@ -651,8 +647,7 @@ static int bfin_can_suspend(struct platform_device *pdev, pm_message_t mesg) | |||
651 | while (!(bfin_read(®->intr) & SMACK)) { | 647 | while (!(bfin_read(®->intr) & SMACK)) { |
652 | udelay(10); | 648 | udelay(10); |
653 | if (--timeout == 0) { | 649 | if (--timeout == 0) { |
654 | dev_err(dev->dev.parent, | 650 | netdev_err(dev, "fail to enter sleep mode\n"); |
655 | "fail to enter sleep mode\n"); | ||
656 | BUG(); | 651 | BUG(); |
657 | } | 652 | } |
658 | } | 653 | } |