Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 288242
b: refs/heads/master
c: 73737b8
h: refs/heads/master
v: v3
  • Loading branch information
Anatolij Gustschin authored and Linus Torvalds committed Mar 5, 2012
1 parent 2ce7e0a commit fd07fad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 22ea71d7f49c3115e3a9ced5eac109fef26d3559
refs/heads/master: 73737b878767ef441d7cc34ebeeba01dd0a68dd6
14 changes: 7 additions & 7 deletions trunk/drivers/rtc/rtc-r9701.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,20 +125,20 @@ 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))
return PTR_ERR(rtc);

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;
}

Expand Down

0 comments on commit fd07fad

Please sign in to comment.