diff options
author | Tomoya <tomoya-linux@dsn.okisemi.com> | 2010-12-12 15:24:18 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-12-13 15:24:24 -0500 |
commit | 8714fcaca63203fe10331fe530ff48d3dd31de4e (patch) | |
tree | fd4c082f6fb3b0cfe841512e4bcd446002211a15 /drivers/net/can | |
parent | 9388b166a323f8f7e35eb7a0d17b297ca695fa91 (diff) |
pch_can: Delete unnecessary/redundant code
Delete unnecessary/redundant code
Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/can')
-rw-r--r-- | drivers/net/can/pch_can.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/net/can/pch_can.c b/drivers/net/can/pch_can.c index da8d37bd02b1..354097872cbe 100644 --- a/drivers/net/can/pch_can.c +++ b/drivers/net/can/pch_can.c | |||
@@ -447,11 +447,6 @@ static void pch_can_release(struct pch_can_priv *priv) | |||
447 | /* This function clears interrupt(s) from the CAN device. */ | 447 | /* This function clears interrupt(s) from the CAN device. */ |
448 | static void pch_can_int_clr(struct pch_can_priv *priv, u32 mask) | 448 | static void pch_can_int_clr(struct pch_can_priv *priv, u32 mask) |
449 | { | 449 | { |
450 | if (mask == PCH_STATUS_INT) { | ||
451 | ioread32(&priv->regs->stat); | ||
452 | return; | ||
453 | } | ||
454 | |||
455 | /* Clear interrupt for transmit object */ | 450 | /* Clear interrupt for transmit object */ |
456 | if ((mask >= PCH_RX_OBJ_START) && (mask <= PCH_RX_OBJ_END)) { | 451 | if ((mask >= PCH_RX_OBJ_START) && (mask <= PCH_RX_OBJ_END)) { |
457 | /* Setting CMASK for clearing the reception interrupts. */ | 452 | /* Setting CMASK for clearing the reception interrupts. */ |
@@ -512,8 +507,6 @@ static void pch_can_error(struct net_device *ndev, u32 status) | |||
512 | state = CAN_STATE_BUS_OFF; | 507 | state = CAN_STATE_BUS_OFF; |
513 | cf->can_id |= CAN_ERR_BUSOFF; | 508 | cf->can_id |= CAN_ERR_BUSOFF; |
514 | can_bus_off(ndev); | 509 | can_bus_off(ndev); |
515 | pch_can_set_run_mode(priv, PCH_CAN_RUN); | ||
516 | dev_err(&ndev->dev, "%s -> Bus Off occurres.\n", __func__); | ||
517 | } | 510 | } |
518 | 511 | ||
519 | errc = ioread32(&priv->regs->errc); | 512 | errc = ioread32(&priv->regs->errc); |
@@ -747,7 +740,7 @@ static int pch_can_poll(struct napi_struct *napi, int quota) | |||
747 | if (!int_stat) | 740 | if (!int_stat) |
748 | goto end; | 741 | goto end; |
749 | 742 | ||
750 | if ((int_stat == PCH_STATUS_INT) && (quota > 0)) { | 743 | if (int_stat == PCH_STATUS_INT) { |
751 | reg_stat = ioread32(&priv->regs->stat); | 744 | reg_stat = ioread32(&priv->regs->stat); |
752 | if (reg_stat & (PCH_BUS_OFF | PCH_LEC_ALL)) { | 745 | if (reg_stat & (PCH_BUS_OFF | PCH_LEC_ALL)) { |
753 | if (reg_stat & PCH_BUS_OFF || | 746 | if (reg_stat & PCH_BUS_OFF || |
@@ -933,10 +926,6 @@ static netdev_tx_t pch_xmit(struct sk_buff *skb, struct net_device *ndev) | |||
933 | priv->tx_obj++; | 926 | priv->tx_obj++; |
934 | } | 927 | } |
935 | 928 | ||
936 | /* Reading the Msg Obj from the Msg RAM to the Interface register. */ | ||
937 | iowrite32(PCH_CMASK_RX_TX_GET, &priv->regs->ifregs[1].cmask); | ||
938 | pch_can_rw_msg_obj(&priv->regs->ifregs[1].creq, tx_obj_no); | ||
939 | |||
940 | /* Setting the CMASK register. */ | 929 | /* Setting the CMASK register. */ |
941 | pch_can_bit_set(&priv->regs->ifregs[1].cmask, PCH_CMASK_ALL); | 930 | pch_can_bit_set(&priv->regs->ifregs[1].cmask, PCH_CMASK_ALL); |
942 | 931 | ||