net/can/mscan: trivial fixes
- remove whitespaces
- use ! and ?: when apropriate
- make braces consistent
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/drivers/net/can/mscan/mpc52xx_can.c b/drivers/net/can/mscan/mpc52xx_can.c
index 4707a82..34ae2ba 100644
--- a/drivers/net/can/mscan/mpc52xx_can.c
+++ b/drivers/net/can/mscan/mpc52xx_can.c
@@ -34,7 +34,6 @@
#include "mscan.h"
-
#define DRV_NAME "mpc5xxx_can"
static struct of_device_id mpc52xx_cdm_ids[] __devinitdata = {
@@ -71,15 +70,10 @@
if (in_8(&cdm->ipb_clk_sel) & 0x1)
freq *= 2;
- val = in_be32(&cdm->rstcfg);
- if (val & (1 << 5))
- freq *= 8;
- else
- freq *= 4;
- if (val & (1 << 6))
- freq /= 12;
- else
- freq /= 16;
+ val = in_be32(&cdm->rstcfg);
+
+ freq *= (val & (1 << 5)) ? 8 : 4;
+ freq /= (val & (1 << 6)) ? 12 : 16;
iounmap(cdm);
@@ -222,7 +216,7 @@
struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base;
regs->canctl0 |= MSCAN_INITRQ;
- while ((regs->canctl1 & MSCAN_INITAK) == 0)
+ while (!(regs->canctl1 & MSCAN_INITAK))
udelay(10);
regs->canctl1 = saved_regs.canctl1;