diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-03-16 16:25:17 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-03-16 16:25:17 -0400 |
commit | a94c7b0a8f31a8bcf3b136d469f7eb6b6b57bb78 (patch) | |
tree | cac33ce0abaaeb56b6e08a396cb7ff4e3e3b8f61 /drivers/rtc | |
parent | d4ef467aea0fdcd5e75a4bbfaf97e579bbe532f3 (diff) | |
parent | 9652e8bd16e73f7a34cabf1ab114aaa5c97db660 (diff) |
Merge branch 'spear/dt' into next/dt2
* spear/dt:
ARM: SPEAr600: Add device-tree support to SPEAr600 boards
(update to v3.3-rc7)
Conflicts:
arch/arm/mach-spear6xx/spear6xx.c
arch/arm/mach-vexpress/Kconfig
The conflicts are between the previous contents of the next/dt2
branch and upstream changes from v3.3-rc7.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-r9701.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/rtc/rtc-r9701.c b/drivers/rtc/rtc-r9701.c index 9beba49c3c5b..2853c2a6f10f 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) | |||
125 | unsigned char tmp; | 125 | unsigned char tmp; |
126 | int res; | 126 | int res; |
127 | 127 | ||
128 | tmp = R100CNT; | ||
129 | res = read_regs(&spi->dev, &tmp, 1); | ||
130 | if (res || tmp != 0x20) { | ||
131 | dev_err(&spi->dev, "cannot read RTC register\n"); | ||
132 | return -ENODEV; | ||
133 | } | ||
134 | |||
128 | rtc = rtc_device_register("r9701", | 135 | rtc = rtc_device_register("r9701", |
129 | &spi->dev, &r9701_rtc_ops, THIS_MODULE); | 136 | &spi->dev, &r9701_rtc_ops, THIS_MODULE); |
130 | if (IS_ERR(rtc)) | 137 | if (IS_ERR(rtc)) |
@@ -132,13 +139,6 @@ static int __devinit r9701_probe(struct spi_device *spi) | |||
132 | 139 | ||
133 | dev_set_drvdata(&spi->dev, rtc); | 140 | dev_set_drvdata(&spi->dev, rtc); |
134 | 141 | ||
135 | tmp = R100CNT; | ||
136 | res = read_regs(&spi->dev, &tmp, 1); | ||
137 | if (res || tmp != 0x20) { | ||
138 | rtc_device_unregister(rtc); | ||
139 | return res; | ||
140 | } | ||
141 | |||
142 | return 0; | 142 | return 0; |
143 | } | 143 | } |
144 | 144 | ||