diff options
author | Jagan Teki <jteki@openedev.com> | 2015-10-23 01:35:47 +0530 |
---|---|---|
committer | Jagan Teki <jteki@openedev.com> | 2015-10-27 23:19:29 +0530 |
commit | c0d1ea4acd53304f9f749790424586f52547a99a (patch) | |
tree | 0e7278bc0684f8822e7ad57bfa372bc93ea79225 | |
parent | a48c4eb6a720d21aae995a6c60903763950fda46 (diff) | |
download | talos-obmc-uboot-c0d1ea4acd53304f9f749790424586f52547a99a.tar.gz talos-obmc-uboot-c0d1ea4acd53304f9f749790424586f52547a99a.zip |
spi: bfin_spi6xx: Use BIT macro
Replace numerical bit shift with BIT macro
in bfin_spi6xx
:%s/(1 << nr)/BIT(nr)/g
where nr = 0, 1, 2 .... 31
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
-rw-r--r-- | drivers/spi/bfin_spi6xx.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/spi/bfin_spi6xx.c b/drivers/spi/bfin_spi6xx.c index eba01d16f5..8359d760f9 100644 --- a/drivers/spi/bfin_spi6xx.c +++ b/drivers/spi/bfin_spi6xx.c @@ -63,9 +63,9 @@ void spi_cs_activate(struct spi_slave *slave) ssel = bfin_read32(&bss->regs->ssel); ssel |= 1 << slave->cs; if (bss->cs_pol) - ssel |= (1 << 8) << slave->cs; + ssel |= BIT(8) << slave->cs; else - ssel &= ~((1 << 8) << slave->cs); + ssel &= ~(BIT(8) << slave->cs); bfin_write32(&bss->regs->ssel, ssel); } @@ -83,9 +83,9 @@ void spi_cs_deactivate(struct spi_slave *slave) u32 ssel; ssel = bfin_read32(&bss->regs->ssel); if (bss->cs_pol) - ssel &= ~((1 << 8) << slave->cs); + ssel &= ~(BIT(8) << slave->cs); else - ssel |= (1 << 8) << slave->cs; + ssel |= BIT(8) << slave->cs; /* deassert cs */ bfin_write32(&bss->regs->ssel, ssel); SSYNC(); |