summaryrefslogtreecommitdiff
path: root/drivers/rtc
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2012-03-13 15:26:52 (GMT)
committerIngo Molnar <mingo@elte.hu>2012-03-13 15:26:52 (GMT)
commit47258cf3c4aa5d56e678bafe0dd0d03ddd980b88 (patch)
tree4856f0fb1185ba97f320a7ed6fb63bf136708a42 /drivers/rtc
parentc308b56b5398779cd3da0f62ab26b0453494c3d4 (diff)
parentfde7d9049e55ab85a390be7f415d74c9f62dd0f9 (diff)
downloadlinux-fsl-qoriq-47258cf3c4aa5d56e678bafe0dd0d03ddd980b88.tar.xz
Merge tag 'v3.3-rc7' into sched/core
Merge reason: merge back final fixes, prepare for the merge window. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-r9701.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/rtc/rtc-r9701.c b/drivers/rtc/rtc-r9701.c
index 9beba49c..2853c2a 100644
--- a/drivers/rtc/rtc-r9701.c
+++ b/drivers/rtc/rtc-r9701.c
@@ -125,6 +125,13 @@ static int __devinit r9701_probe(struct spi_device *spi)
unsigned char tmp;
int res;
+ tmp = R100CNT;
+ res = read_regs(&spi->dev, &tmp, 1);
+ if (res || tmp != 0x20) {
+ dev_err(&spi->dev, "cannot read RTC register\n");
+ return -ENODEV;
+ }
+
rtc = rtc_device_register("r9701",
&spi->dev, &r9701_rtc_ops, THIS_MODULE);
if (IS_ERR(rtc))
@@ -132,13 +139,6 @@ static int __devinit r9701_probe(struct spi_device *spi)
dev_set_drvdata(&spi->dev, rtc);
- tmp = R100CNT;
- res = read_regs(&spi->dev, &tmp, 1);
- if (res || tmp != 0x20) {
- rtc_device_unregister(rtc);
- return res;
- }
-
return 0;
}