[Openchrome-devel] [PATCH] Small fix to VT1632 detection

Mario J. Rugiero mrugiero at gmail.com
Mon Jun 27 00:47:28 UTC 2016


via_vt1632_detect was checking the 0x02 flag by using the boolean
and operator instead of the binary one, which causes any non-zero
value to set the status as connected.

Signed-off-by: Mario J. Rugiero <mrugiero at gmail.com>
---
  src/via_vt1632.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/via_vt1632.c b/src/via_vt1632.c
index c82d3a8..0d6b662 100644
--- a/src/via_vt1632.c
+++ b/src/via_vt1632.c
@@ -212,7 +212,7 @@ via_vt1632_detect(xf86OutputPtr output)
                          "Entered via_vt1632_detect.\n"));

      xf86I2CReadByte(Private->VT1632I2CDev, 0x09, &tmp);
-    if (tmp && 0x02) {
+    if (tmp & 0x02) {
          xf86DrvMsg(pScrn->scrnIndex, X_INFO,
                      "VT1632A: DVI device is detected.\n");
          status = XF86OutputStatusConnected;
-- 
2.9.0




More information about the Openchrome-devel mailing list