Chris, On Wed, Sep 10, 2014 at 7:04 PM, Chris Zhong <[email protected]> wrote: > Signed-off-by: Chris Zhong <[email protected]>
It's good to add a description, like: If the date/time is invalid at bootup, there's no reason to set it to a bogus value. We can just let the data and time be invalid until someone makes it valid. > --- > > drivers/rtc/rtc-rk808.c | 17 ++--------------- > 1 file changed, 2 insertions(+), 15 deletions(-) Other than the lack of description, this looks great. It applies atop Andrew's patch to make tm_dev "static" and works like a charm. I tested by hacking the device with: i2cset -f -y 0 0x1b 0x10 0xc1 i2cset -f -y 0 0x1b 3 0x32 i2cset -f -y 0 0x1b 0x10 0xc0 That made it think it was the 32nd day of the month. I then rebooted and saw: [ 3.371853] rk808-rtc rk808-rtc: invalid date/time [ 3.379115] rk808-rtc rk808-rtc: rtc core: registered rk808-rtc as rtc0 [ 5.411574] rk808-rtc rk808-rtc: hctosys: invalid date/time I was still able to set the clock. Once I did it worked fine. Reviewed-by: Doug Anderson <[email protected]> Tested-by: Doug Anderson <[email protected]> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

