summaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorNikita Kiryanov <nikita@compulab.co.il>2014-10-28 14:59:29 +0200
committerTom Rini <trini@ti.com>2014-10-28 12:39:59 -0400
commit0029d6c1deadd1d350688c56c791fc4afe44dbcf (patch)
treea4bc92ed472d085a6bb4fb2f93a4a6402b28a09f /drivers/block
parent93575c30acda2b5802f542a17b296646841c88c1 (diff)
downloadu-boot-imx-0029d6c1deadd1d350688c56c791fc4afe44dbcf.zip
u-boot-imx-0029d6c1deadd1d350688c56c791fc4afe44dbcf.tar.gz
u-boot-imx-0029d6c1deadd1d350688c56c791fc4afe44dbcf.tar.bz2
dwc_ahsata: use bitwise operator in sata_port_status
The logic of the return statement in sata_port_status() calls for a bitwise 'AND' operator, not logical 'AND'. Fix the typo. Reported-by: Jeroen Hofstee <jeroen@myspectrum.nl> Cc: Jeroen Hofstee <jeroen@myspectrum.nl> Cc: Stefano Babic <sbabic@denx.de> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/dwc_ahsata.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/dwc_ahsata.c b/drivers/block/dwc_ahsata.c
index 29f478b..c68fd2f 100644
--- a/drivers/block/dwc_ahsata.c
+++ b/drivers/block/dwc_ahsata.c
@@ -878,7 +878,7 @@ int sata_port_status(int dev, int port)
probe_ent = (struct ahci_probe_ent *)sata_dev_desc[dev].priv;
port_mmio = (struct sata_port_regs *)probe_ent->port[port].port_mmio;
- return readl(&(port_mmio->ssts)) && SATA_PORT_SSTS_DET_MASK;
+ return readl(&(port_mmio->ssts)) & SATA_PORT_SSTS_DET_MASK;
}
/*