From: Wan ZongShun Date: Wed, 11 Aug 2010 01:02:07 +0000 (-0700) Subject: rtc/nuc900: fix checking of args during time-setting X-Git-Tag: v2.6.36-rc1~216 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70d2a0bae26c7c44641785d9def8a0d9048abbea;p=pandora-kernel.git 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-diff-tree failed