BUG: Re: [PATCH] I2C: add new rx8025 driver

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

 



Hello,

I just found a bug in that driver:

> ...
> +	if (result[0] | RX8025_BIT_CTRL1_1224)
> +		dt->tm_hour = BCD2BIN(result[2 + RX8025_REG_HOUR] & 0x3f);
> +	else
> +		dt->tm_hour = BCD2BIN(result[2 + RX8025_REG_HOUR] & 0x1f) % 12
> +			+ (result[2 + RX8025_REG_HOUR] & 0x20 ? 12 : 0);
> ...
That "|" has to be an "&", else the test is quite useless.

just in case someone wants to use this driver before I'm able to submit
an updated version...

Best regards
Uwe Zeisberger

-- 
Uwe Zeisberger

$ dc -e "5735816763073014741799356604682P"




[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux