diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-03-15 20:11:36 +0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-03-15 20:11:40 +0400 |
commit | 86a30bece9ad4cc91c393a829a7b128291e0fb65 (patch) | |
tree | 6cb3e6ad413d74118535f77436056c8d3cfae0eb /drivers/rtc | |
parent | 243d58ec5792299fa212d05a4113c0ebac2df6a3 (diff) | |
parent | a323f66439c04d1c3ae4dc20cc2d44d52ee43c9f (diff) | |
download | linux-86a30bece9ad4cc91c393a829a7b128291e0fb65.tar.xz |
Merge branch 'fixes-non-critical' of git://github.com/hzhuang1/linux into next/maintainers
* 'fixes-non-critical' of git://github.com/hzhuang1/linux:
MAINTAINERS: update MAINTAINERS email entry
MAINTAINERS: update maintainer entry for pxa/hx4700
(update to 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) 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; } |