[PATCH 08/14] usb: ulpi: fix logic-op

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Checking register bits is a bitwise operation.

Signed-off-by: Lucas Stach <dev@xxxxxxxxxx>
---
 drivers/usb/otg/ulpi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/otg/ulpi.c b/drivers/usb/otg/ulpi.c
index e0aa201..6fef5f2 100644
--- a/drivers/usb/otg/ulpi.c
+++ b/drivers/usb/otg/ulpi.c
@@ -51,7 +51,7 @@ int ulpi_read(int reg, void __iomem *view)
 	int ret;
 
 	/* make sure interface is running */
-	if (!(readl(view) && ULPIVW_SS)) {
+	if (!(readl(view) & ULPIVW_SS)) {
 		writel(ULPIVW_WU, view);
 
 		/* wait for wakeup */
@@ -73,7 +73,7 @@ int ulpi_set(u8 bits, int reg, void __iomem *view)
 	int ret;
 
 	/* make sure the interface is running */
-	if (!(readl(view) && ULPIVW_SS)) {
+	if (!(readl(view) & ULPIVW_SS)) {
 		writel(ULPIVW_WU, view);
 		/* wait for wakeup */
 		ret = ulpi_poll(view, ULPIVW_WU);
-- 
1.8.5.3


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux