From 24a35126bfcf8b462cc167307c274106e7128a3f Mon Sep 17 00:00:00 2001 From: Jeff Ciesielski Date: Fri, 19 Oct 2012 23:05:37 -0700 Subject: [PATCH] stm32/f1/can: Replace mistaken logical operators with bitwise operators. also: remove unnecessary parenthesis --- lib/stm32/f1/can.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/stm32/f1/can.c b/lib/stm32/f1/can.c index 46d0e652..9bd23cb3 100644 --- a/lib/stm32/f1/can.c +++ b/lib/stm32/f1/can.c @@ -87,14 +87,14 @@ int can_init(u32 canport, bool ttcm, bool abom, bool awum, bool nart, CAN_MCR(canport) &= ~CAN_MCR_TXFP; if (silent) - CAN_BTR(canport) |= (CAN_BTR_SILM); + CAN_BTR(canport) |= CAN_BTR_SILM; else - CAN_BTR(canport) &= !(CAN_BTR_SILM); + CAN_BTR(canport) &= ~CAN_BTR_SILM; if (loopback) - CAN_BTR(canport) |= (CAN_BTR_LBKM); + CAN_BTR(canport) |= CAN_BTR_LBKM; else - CAN_BTR(canport) &= !(CAN_BTR_LBKM); + CAN_BTR(canport) &= ~CAN_BTR_LBKM; /* Set bit timings. */