Skip to content

Commit

Permalink
can: at91_can: directly define AT91_MB_RX_LAST
Browse files Browse the repository at this point in the history
...instead of deriving it from AT91_MB_RX_FIRST and AT91_MB_RX_NUM.
This removes a level of computation, when switching the driver from
compile time constants to runtime values.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
  • Loading branch information
Marc Kleine-Budde committed Jun 6, 2011
1 parent 9c2e0a6 commit 267cbe0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/can/at91_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,10 @@
* RX/TX Mailbox split
* don't dare to touch
*/
#define AT91_MB_RX_NUM 11
#define AT91_MB_TX_SHIFT 2

#define AT91_MB_RX_FIRST 1
#define AT91_MB_RX_LAST (AT91_MB_RX_FIRST + AT91_MB_RX_NUM - 1)
#define AT91_MB_RX_LAST 11

#define AT91_MB_RX_MASK(i) ((1 << (i)) - 1)
#define AT91_MB_RX_SPLIT 8
Expand Down

0 comments on commit 267cbe0

Please sign in to comment.