diff options
author | David S. Miller <davem@davemloft.net> | 2011-08-17 23:16:00 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-08-17 23:16:00 -0400 |
commit | f3ba150392c85d8175c454a7190b5fa46a49039e (patch) | |
tree | 4df54351d5d71fddaf416c3ee984382e885c7acb | |
parent | c6865cb3cc6f3c2857fa4c6f5fda2945d70b1e84 (diff) | |
parent | 665d7eb8877c6bb777039efb22f894740be10bcb (diff) |
Merge branch 'can/mscan' of git://git.pengutronix.de/git/mkl/linux-2.6
-rw-r--r-- | drivers/net/can/mscan/mscan.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/net/can/mscan/mscan.c b/drivers/net/can/mscan/mscan.c index 92feac68b66e..ac42f5da91b5 100644 --- a/drivers/net/can/mscan/mscan.c +++ b/drivers/net/can/mscan/mscan.c | |||
@@ -62,7 +62,7 @@ static enum can_state state_map[] = { | |||
62 | static int mscan_set_mode(struct net_device *dev, u8 mode) | 62 | static int mscan_set_mode(struct net_device *dev, u8 mode) |
63 | { | 63 | { |
64 | struct mscan_priv *priv = netdev_priv(dev); | 64 | struct mscan_priv *priv = netdev_priv(dev); |
65 | struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; | 65 | struct mscan_regs __iomem *regs = priv->reg_base; |
66 | int ret = 0; | 66 | int ret = 0; |
67 | int i; | 67 | int i; |
68 | u8 canctl1; | 68 | u8 canctl1; |
@@ -138,7 +138,7 @@ static int mscan_set_mode(struct net_device *dev, u8 mode) | |||
138 | static int mscan_start(struct net_device *dev) | 138 | static int mscan_start(struct net_device *dev) |
139 | { | 139 | { |
140 | struct mscan_priv *priv = netdev_priv(dev); | 140 | struct mscan_priv *priv = netdev_priv(dev); |
141 | struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; | 141 | struct mscan_regs __iomem *regs = priv->reg_base; |
142 | u8 canrflg; | 142 | u8 canrflg; |
143 | int err; | 143 | int err; |
144 | 144 | ||
@@ -178,7 +178,7 @@ static int mscan_restart(struct net_device *dev) | |||
178 | struct mscan_priv *priv = netdev_priv(dev); | 178 | struct mscan_priv *priv = netdev_priv(dev); |
179 | 179 | ||
180 | if (priv->type == MSCAN_TYPE_MPC5121) { | 180 | if (priv->type == MSCAN_TYPE_MPC5121) { |
181 | struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; | 181 | struct mscan_regs __iomem *regs = priv->reg_base; |
182 | 182 | ||
183 | priv->can.state = CAN_STATE_ERROR_ACTIVE; | 183 | priv->can.state = CAN_STATE_ERROR_ACTIVE; |
184 | WARN(!(in_8(®s->canmisc) & MSCAN_BOHOLD), | 184 | WARN(!(in_8(®s->canmisc) & MSCAN_BOHOLD), |
@@ -199,7 +199,7 @@ static netdev_tx_t mscan_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
199 | { | 199 | { |
200 | struct can_frame *frame = (struct can_frame *)skb->data; | 200 | struct can_frame *frame = (struct can_frame *)skb->data; |
201 | struct mscan_priv *priv = netdev_priv(dev); | 201 | struct mscan_priv *priv = netdev_priv(dev); |
202 | struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; | 202 | struct mscan_regs __iomem *regs = priv->reg_base; |
203 | int i, rtr, buf_id; | 203 | int i, rtr, buf_id; |
204 | u32 can_id; | 204 | u32 can_id; |
205 | 205 | ||
@@ -305,7 +305,7 @@ static enum can_state check_set_state(struct net_device *dev, u8 canrflg) | |||
305 | static void mscan_get_rx_frame(struct net_device *dev, struct can_frame *frame) | 305 | static void mscan_get_rx_frame(struct net_device *dev, struct can_frame *frame) |
306 | { | 306 | { |
307 | struct mscan_priv *priv = netdev_priv(dev); | 307 | struct mscan_priv *priv = netdev_priv(dev); |
308 | struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; | 308 | struct mscan_regs __iomem *regs = priv->reg_base; |
309 | u32 can_id; | 309 | u32 can_id; |
310 | int i; | 310 | int i; |
311 | 311 | ||
@@ -343,7 +343,7 @@ static void mscan_get_err_frame(struct net_device *dev, struct can_frame *frame, | |||
343 | u8 canrflg) | 343 | u8 canrflg) |
344 | { | 344 | { |
345 | struct mscan_priv *priv = netdev_priv(dev); | 345 | struct mscan_priv *priv = netdev_priv(dev); |
346 | struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; | 346 | struct mscan_regs __iomem *regs = priv->reg_base; |
347 | struct net_device_stats *stats = &dev->stats; | 347 | struct net_device_stats *stats = &dev->stats; |
348 | enum can_state old_state; | 348 | enum can_state old_state; |
349 | 349 | ||
@@ -406,7 +406,7 @@ static int mscan_rx_poll(struct napi_struct *napi, int quota) | |||
406 | { | 406 | { |
407 | struct mscan_priv *priv = container_of(napi, struct mscan_priv, napi); | 407 | struct mscan_priv *priv = container_of(napi, struct mscan_priv, napi); |
408 | struct net_device *dev = napi->dev; | 408 | struct net_device *dev = napi->dev; |
409 | struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; | 409 | struct mscan_regs __iomem *regs = priv->reg_base; |
410 | struct net_device_stats *stats = &dev->stats; | 410 | struct net_device_stats *stats = &dev->stats; |
411 | int npackets = 0; | 411 | int npackets = 0; |
412 | int ret = 1; | 412 | int ret = 1; |
@@ -453,7 +453,7 @@ static irqreturn_t mscan_isr(int irq, void *dev_id) | |||
453 | { | 453 | { |
454 | struct net_device *dev = (struct net_device *)dev_id; | 454 | struct net_device *dev = (struct net_device *)dev_id; |
455 | struct mscan_priv *priv = netdev_priv(dev); | 455 | struct mscan_priv *priv = netdev_priv(dev); |
456 | struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; | 456 | struct mscan_regs __iomem *regs = priv->reg_base; |
457 | struct net_device_stats *stats = &dev->stats; | 457 | struct net_device_stats *stats = &dev->stats; |
458 | u8 cantier, cantflg, canrflg; | 458 | u8 cantier, cantflg, canrflg; |
459 | irqreturn_t ret = IRQ_NONE; | 459 | irqreturn_t ret = IRQ_NONE; |
@@ -537,7 +537,7 @@ static int mscan_do_set_mode(struct net_device *dev, enum can_mode mode) | |||
537 | static int mscan_do_set_bittiming(struct net_device *dev) | 537 | static int mscan_do_set_bittiming(struct net_device *dev) |
538 | { | 538 | { |
539 | struct mscan_priv *priv = netdev_priv(dev); | 539 | struct mscan_priv *priv = netdev_priv(dev); |
540 | struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; | 540 | struct mscan_regs __iomem *regs = priv->reg_base; |
541 | struct can_bittiming *bt = &priv->can.bittiming; | 541 | struct can_bittiming *bt = &priv->can.bittiming; |
542 | u8 btr0, btr1; | 542 | u8 btr0, btr1; |
543 | 543 | ||
@@ -559,7 +559,7 @@ static int mscan_open(struct net_device *dev) | |||
559 | { | 559 | { |
560 | int ret; | 560 | int ret; |
561 | struct mscan_priv *priv = netdev_priv(dev); | 561 | struct mscan_priv *priv = netdev_priv(dev); |
562 | struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; | 562 | struct mscan_regs __iomem *regs = priv->reg_base; |
563 | 563 | ||
564 | /* common open */ | 564 | /* common open */ |
565 | ret = open_candev(dev); | 565 | ret = open_candev(dev); |
@@ -598,7 +598,7 @@ exit_napi_disable: | |||
598 | static int mscan_close(struct net_device *dev) | 598 | static int mscan_close(struct net_device *dev) |
599 | { | 599 | { |
600 | struct mscan_priv *priv = netdev_priv(dev); | 600 | struct mscan_priv *priv = netdev_priv(dev); |
601 | struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; | 601 | struct mscan_regs __iomem *regs = priv->reg_base; |
602 | 602 | ||
603 | netif_stop_queue(dev); | 603 | netif_stop_queue(dev); |
604 | napi_disable(&priv->napi); | 604 | napi_disable(&priv->napi); |
@@ -622,7 +622,7 @@ static const struct net_device_ops mscan_netdev_ops = { | |||
622 | int register_mscandev(struct net_device *dev, int mscan_clksrc) | 622 | int register_mscandev(struct net_device *dev, int mscan_clksrc) |
623 | { | 623 | { |
624 | struct mscan_priv *priv = netdev_priv(dev); | 624 | struct mscan_priv *priv = netdev_priv(dev); |
625 | struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; | 625 | struct mscan_regs __iomem *regs = priv->reg_base; |
626 | u8 ctl1; | 626 | u8 ctl1; |
627 | 627 | ||
628 | ctl1 = in_8(®s->canctl1); | 628 | ctl1 = in_8(®s->canctl1); |
@@ -659,7 +659,7 @@ int register_mscandev(struct net_device *dev, int mscan_clksrc) | |||
659 | void unregister_mscandev(struct net_device *dev) | 659 | void unregister_mscandev(struct net_device *dev) |
660 | { | 660 | { |
661 | struct mscan_priv *priv = netdev_priv(dev); | 661 | struct mscan_priv *priv = netdev_priv(dev); |
662 | struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; | 662 | struct mscan_regs __iomem *regs = priv->reg_base; |
663 | mscan_set_mode(dev, MSCAN_INIT_MODE); | 663 | mscan_set_mode(dev, MSCAN_INIT_MODE); |
664 | clrbits8(®s->canctl1, MSCAN_CANE); | 664 | clrbits8(®s->canctl1, MSCAN_CANE); |
665 | unregister_candev(dev); | 665 | unregister_candev(dev); |