]> git.baikalelectronics.ru Git - kernel.git/commit
nuc900/rtc: change the waiting for device ready implement
authorWan ZongShun <mcuos.com@gmail.com>
Wed, 11 Aug 2010 01:02:05 +0000 (18:02 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Aug 2010 15:59:06 +0000 (08:59 -0700)
commit83560b350606d16acfcf7a3ad2148b604a084d52
tree6586428d02fe9365201eb28518d93ea27aa0b5da
parent4e333dac860793c9f72a0b920a9ef6a2af4cb953
nuc900/rtc: change the waiting for device ready implement

- add an mdelay(1) to the polling loop to cause less frequent access to
  the hardware register.

- change the return value from ENODEV to EPERM if the loop timed out.  I
  think the 'Operation not permitted' description is more suitable for the
  meaning of 'check_rtc_access_enable()' function, it just be used to
  judge rtc access operation is permitted or not.

Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/rtc-nuc900.c