summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-r9701.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2012-03-14 08:48:16 (GMT)
committerIngo Molnar <mingo@elte.hu>2012-03-14 08:48:16 (GMT)
commitc96a9876696d30783ad54399351a0bf3660db53f (patch)
tree74daba0ed1fd2838e8eb527c4f7fe5262ee979bd /drivers/rtc/rtc-r9701.c
parentd1f42e314c9c50541c79a6edf2b4cab63fe02ee3 (diff)
parentfde7d9049e55ab85a390be7f415d74c9f62dd0f9 (diff)
downloadlinux-fsl-qoriq-c96a9876696d30783ad54399351a0bf3660db53f.tar.xz
Merge tag 'v3.3-rc7' into x86/platform
Merge reason: Update to the almost-final v3.3 kernel. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/rtc/rtc-r9701.c')
-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;
}