From 70d2a0bae26c7c44641785d9def8a0d9048abbea Mon Sep 17 00:00:00 2001 From: Wan ZongShun Date: Tue, 10 Aug 2010 18:02:07 -0700 Subject: [PATCH] rtc/nuc900: fix checking of args during time-setting When a user application wants to set the rtc time, the RTC subsystem takes advantage of 'rtc_valid_tm(tm)' to check 'rtc_time *tm' value validity, it make sure the 'tm->tm_year' is larger than 70,so if '70< tm_year < 100', the '(settm->tm_year - 100)' will be negative. ' Setting the negative value to hardware register will be invalid, so I add the 'if' condition to make sure set a valid value to register. Signed-off-by: Wan ZongShun Cc: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-format-patch failed