diff options
author | Ed Spiridonov <edo.rus@gmail.com> | 2016-03-04 09:07:27 +0300 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2016-03-04 10:45:17 +0300 |
commit | d694b06c42a56c9610861ee0474b4d441af8ada6 (patch) | |
tree | 1988f2ad6c038661dd1b5a925b624dad908c1332 /drivers/net/can/spi/mcp251x.c | |
parent | c1bb0a5588816ec26abc08aa9adcf90e32656781 (diff) | |
download | linux-d694b06c42a56c9610861ee0474b4d441af8ada6.tar.xz |
can: mcp251x: avoid write to error flag register if it's unnecessary
Only two bits (RX0OVR and RX1OVR) are writable in EFLG, write is useless
if these bits aren't set.
Signed-off-by: Ed Spiridonov <edo.rus@gmail.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/spi/mcp251x.c')
-rw-r--r-- | drivers/net/can/spi/mcp251x.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/spi/mcp251x.c b/drivers/net/can/spi/mcp251x.c index 575790e8a75a..74a7dfecee27 100644 --- a/drivers/net/can/spi/mcp251x.c +++ b/drivers/net/can/spi/mcp251x.c @@ -843,7 +843,7 @@ static irqreturn_t mcp251x_can_ist(int irq, void *dev_id) if (clear_intf) mcp251x_write_bits(spi, CANINTF, clear_intf, 0x00); - if (eflag) + if (eflag & (EFLG_RX0OVR | EFLG_RX1OVR)) mcp251x_write_bits(spi, EFLG, eflag, 0x00); /* Update can state */ |