diff options
Diffstat (limited to 'drivers/net/can/mscan')
-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 4cc6f44c2ba..ec4a3119e2c 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 | ||
@@ -307,7 +307,7 @@ static enum can_state check_set_state(struct net_device *dev, u8 canrflg) | |||
307 | static void mscan_get_rx_frame(struct net_device *dev, struct can_frame *frame) | 307 | static void mscan_get_rx_frame(struct net_device *dev, struct can_frame *frame) |
308 | { | 308 | { |
309 | struct mscan_priv *priv = netdev_priv(dev); | 309 | struct mscan_priv *priv = netdev_priv(dev); |
310 | struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; | 310 | struct mscan_regs __iomem *regs = priv->reg_base; |
311 | u32 can_id; | 311 | u32 can_id; |
312 | int i; | 312 | int i; |
313 | 313 | ||
@@ -348,7 +348,7 @@ static void mscan_get_err_frame(struct net_device *dev, struct can_frame *frame, | |||
348 | u8 canrflg) | 348 | u8 canrflg) |
349 | { | 349 | { |
350 | struct mscan_priv *priv = netdev_priv(dev); | 350 | struct mscan_priv *priv = netdev_priv(dev); |
351 | struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; | 351 | struct mscan_regs __iomem *regs = priv->reg_base; |
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 | ||
@@ -411,7 +411,7 @@ static int mscan_rx_poll(struct napi_struct *napi, int quota) | |||
411 | { | 411 | { |
412 | struct mscan_priv *priv = container_of(napi, struct mscan_priv, napi); | 412 | struct mscan_priv *priv = container_of(napi, struct mscan_priv, napi); |
413 | struct net_device *dev = napi->dev; | 413 | struct net_device *dev = napi->dev; |
414 | struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; | 414 | struct mscan_regs __iomem *regs = priv->reg_base; |
415 | struct net_device_stats *stats = &dev->stats; | 415 | struct net_device_stats *stats = &dev->stats; |
416 | int npackets = 0; | 416 | int npackets = 0; |
417 | int ret = 1; | 417 | int ret = 1; |
@@ -458,7 +458,7 @@ static irqreturn_t mscan_isr(int irq, void *dev_id) | |||
458 | { | 458 | { |
459 | struct net_device *dev = (struct net_device *)dev_id; | 459 | struct net_device *dev = (struct net_device *)dev_id; |
460 | struct mscan_priv *priv = netdev_priv(dev); | 460 | struct mscan_priv *priv = netdev_priv(dev); |
461 | struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; | 461 | struct mscan_regs __iomem *regs = priv->reg_base; |
462 | struct net_device_stats *stats = &dev->stats; | 462 | struct net_device_stats *stats = &dev->stats; |
463 | u8 cantier, cantflg, canrflg; | 463 | u8 cantier, cantflg, canrflg; |
464 | irqreturn_t ret = IRQ_NONE; | 464 | irqreturn_t ret = IRQ_NONE; |
@@ -542,7 +542,7 @@ static int mscan_do_set_mode(struct net_device *dev, enum can_mode mode) | |||
542 | static int mscan_do_set_bittiming(struct net_device *dev) | 542 | static int mscan_do_set_bittiming(struct net_device *dev) |
543 | { | 543 | { |
544 | struct mscan_priv *priv = netdev_priv(dev); | 544 | struct mscan_priv *priv = netdev_priv(dev); |
545 | struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; | 545 | struct mscan_regs __iomem *regs = priv->reg_base; |
546 | struct can_bittiming *bt = &priv->can.bittiming; | 546 | struct can_bittiming *bt = &priv->can.bittiming; |
547 | u8 btr0, btr1; | 547 | u8 btr0, btr1; |
548 | 548 | ||
@@ -564,7 +564,7 @@ static int mscan_open(struct net_device *dev) | |||
564 | { | 564 | { |
565 | int ret; | 565 | int ret; |
566 | struct mscan_priv *priv = netdev_priv(dev); | 566 | struct mscan_priv *priv = netdev_priv(dev); |
567 | struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; | 567 | struct mscan_regs __iomem *regs = priv->reg_base; |
568 | 568 | ||
569 | /* common open */ | 569 | /* common open */ |
570 | ret = open_candev(dev); | 570 | ret = open_candev(dev); |
@@ -603,7 +603,7 @@ exit_napi_disable: | |||
603 | static int mscan_close(struct net_device *dev) | 603 | static int mscan_close(struct net_device *dev) |
604 | { | 604 | { |
605 | struct mscan_priv *priv = netdev_priv(dev); | 605 | struct mscan_priv *priv = netdev_priv(dev); |
606 | struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; | 606 | struct mscan_regs __iomem *regs = priv->reg_base; |
607 | 607 | ||
608 | netif_stop_queue(dev); | 608 | netif_stop_queue(dev); |
609 | napi_disable(&priv->napi); | 609 | napi_disable(&priv->napi); |
@@ -627,7 +627,7 @@ static const struct net_device_ops mscan_netdev_ops = { | |||
627 | int register_mscandev(struct net_device *dev, int mscan_clksrc) | 627 | int register_mscandev(struct net_device *dev, int mscan_clksrc) |
628 | { | 628 | { |
629 | struct mscan_priv *priv = netdev_priv(dev); | 629 | struct mscan_priv *priv = netdev_priv(dev); |
630 | struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; | 630 | struct mscan_regs __iomem *regs = priv->reg_base; |
631 | u8 ctl1; | 631 | u8 ctl1; |
632 | 632 | ||
633 | ctl1 = in_8(®s->canctl1); | 633 | ctl1 = in_8(®s->canctl1); |
@@ -664,7 +664,7 @@ int register_mscandev(struct net_device *dev, int mscan_clksrc) | |||
664 | void unregister_mscandev(struct net_device *dev) | 664 | void unregister_mscandev(struct net_device *dev) |
665 | { | 665 | { |
666 | struct mscan_priv *priv = netdev_priv(dev); | 666 | struct mscan_priv *priv = netdev_priv(dev); |
667 | struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; | 667 | struct mscan_regs __iomem *regs = priv->reg_base; |
668 | mscan_set_mode(dev, MSCAN_INIT_MODE); | 668 | mscan_set_mode(dev, MSCAN_INIT_MODE); |
669 | clrbits8(®s->canctl1, MSCAN_CANE); | 669 | clrbits8(®s->canctl1, MSCAN_CANE); |
670 | unregister_candev(dev); | 670 | unregister_candev(dev); |