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

Xavier Bachelot xavier at bachelot.org
Mon Jun 27 07:21:57 UTC 2016


On 27/06/2016 02:47, Mario J. Rugiero wrote:
> 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;


Good catch :-)

Reviewed-by: Xavier Bachelot <xavier at bachelot.org>


More information about the Openchrome-devel mailing list