diff options
author | Jagan Teki <jteki@openedev.com> | 2015-10-23 01:37:56 +0530 |
---|---|---|
committer | Jagan Teki <jteki@openedev.com> | 2015-10-27 23:21:16 +0530 |
commit | 69fd4c386cb4ca60fa5d3c8e28d6601b1a48acac (patch) | |
tree | 4074341bcfefc352dfb5ff6a1e8607617fc60cd5 /drivers/spi/ich.c | |
parent | 29e6abd94b0d879b0b92538d41b80d22b4a28d2c (diff) | |
download | u-boot-imx-69fd4c386cb4ca60fa5d3c8e28d6601b1a48acac.zip u-boot-imx-69fd4c386cb4ca60fa5d3c8e28d6601b1a48acac.tar.gz u-boot-imx-69fd4c386cb4ca60fa5d3c8e28d6601b1a48acac.tar.bz2 |
spi: ich: Use BIT macro
Replace numerical bit shift with BIT macro
in ich
:%s/(1 << nr)/BIT(nr)/g
where nr = 0, 1, 2 .... 31
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
Diffstat (limited to 'drivers/spi/ich.c')
-rw-r--r-- | drivers/spi/ich.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c index be4c0a3..af327c4 100644 --- a/drivers/spi/ich.c +++ b/drivers/spi/ich.c @@ -692,13 +692,13 @@ static int ich_spi_probe(struct udevice *bus) */ if (plat->use_sbase) { bios_cntl = ich_readb(priv, priv->bcr); - bios_cntl &= ~(1 << 5); /* clear Enable InSMM_STS (EISS) */ + bios_cntl &= ~BIT(5); /* clear Enable InSMM_STS (EISS) */ bios_cntl |= 1; /* Write Protect Disable (WPD) */ ich_writeb(priv, bios_cntl, priv->bcr); } else { pci_read_config_byte(plat->dev, 0xdc, &bios_cntl); if (plat->ich_version == 9) - bios_cntl &= ~(1 << 5); + bios_cntl &= ~BIT(5); pci_write_config_byte(plat->dev, 0xdc, bios_cntl | 0x1); } |