aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/interface.c2
-rw-r--r--drivers/rtc/rtc-at91rm9200.c2
-rw-r--r--drivers/rtc/rtc-bfin.c4
-rw-r--r--drivers/rtc/rtc-lpc32xx.c2
-rw-r--r--drivers/rtc/rtc-mrst.c7
-rw-r--r--drivers/rtc/rtc-x1205.c2
6 files changed, 10 insertions, 9 deletions
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
index 8ec6b069a7f5..23719f0acbf6 100644
--- a/drivers/rtc/interface.c
+++ b/drivers/rtc/interface.c
@@ -454,7 +454,7 @@ EXPORT_SYMBOL_GPL(rtc_update_irq_enable);
454 * @rtc: pointer to the rtc device 454 * @rtc: pointer to the rtc device
455 * 455 *
456 * This function is called when an AIE, UIE or PIE mode interrupt 456 * This function is called when an AIE, UIE or PIE mode interrupt
457 * has occured (or been emulated). 457 * has occurred (or been emulated).
458 * 458 *
459 * Triggers the registered irq_task function callback. 459 * Triggers the registered irq_task function callback.
460 */ 460 */
diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c
index 518a76ec71ca..e39b77a4609a 100644
--- a/drivers/rtc/rtc-at91rm9200.c
+++ b/drivers/rtc/rtc-at91rm9200.c
@@ -60,7 +60,7 @@ static void at91_rtc_decodetime(unsigned int timereg, unsigned int calreg,
60 /* 60 /*
61 * The Calendar Alarm register does not have a field for 61 * The Calendar Alarm register does not have a field for
62 * the year - so these will return an invalid value. When an 62 * the year - so these will return an invalid value. When an
63 * alarm is set, at91_alarm_year wille store the current year. 63 * alarm is set, at91_alarm_year will store the current year.
64 */ 64 */
65 tm->tm_year = bcd2bin(date & AT91_RTC_CENT) * 100; /* century */ 65 tm->tm_year = bcd2bin(date & AT91_RTC_CENT) * 100; /* century */
66 tm->tm_year += bcd2bin((date & AT91_RTC_YEAR) >> 8); /* year */ 66 tm->tm_year += bcd2bin((date & AT91_RTC_YEAR) >> 8); /* year */
diff --git a/drivers/rtc/rtc-bfin.c b/drivers/rtc/rtc-bfin.c
index ca9cff85ab8a..a0fc4cf42abf 100644
--- a/drivers/rtc/rtc-bfin.c
+++ b/drivers/rtc/rtc-bfin.c
@@ -20,9 +20,9 @@
20 * write would be discarded and things quickly fall apart. 20 * write would be discarded and things quickly fall apart.
21 * 21 *
22 * To keep this delay from significantly degrading performance (we, in theory, 22 * To keep this delay from significantly degrading performance (we, in theory,
23 * would have to sleep for up to 1 second everytime we wanted to write a 23 * would have to sleep for up to 1 second every time we wanted to write a
24 * register), we only check the write pending status before we start to issue 24 * register), we only check the write pending status before we start to issue
25 * a new write. We bank on the idea that it doesnt matter when the sync 25 * a new write. We bank on the idea that it doesn't matter when the sync
26 * happens so long as we don't attempt another write before it does. The only 26 * happens so long as we don't attempt another write before it does. The only
27 * time userspace would take this penalty is when they try and do multiple 27 * time userspace would take this penalty is when they try and do multiple
28 * operations right after another ... but in this case, they need to take the 28 * operations right after another ... but in this case, they need to take the
diff --git a/drivers/rtc/rtc-lpc32xx.c b/drivers/rtc/rtc-lpc32xx.c
index ec8701ce99f9..ae16250c762f 100644
--- a/drivers/rtc/rtc-lpc32xx.c
+++ b/drivers/rtc/rtc-lpc32xx.c
@@ -240,7 +240,7 @@ static int __devinit lpc32xx_rtc_probe(struct platform_device *pdev)
240 spin_lock_init(&rtc->lock); 240 spin_lock_init(&rtc->lock);
241 241
242 /* 242 /*
243 * The RTC is on a seperate power domain and can keep it's state 243 * The RTC is on a separate power domain and can keep it's state
244 * across a chip power cycle. If the RTC has never been previously 244 * across a chip power cycle. If the RTC has never been previously
245 * setup, then set it up now for the first time. 245 * setup, then set it up now for the first time.
246 */ 246 */
diff --git a/drivers/rtc/rtc-mrst.c b/drivers/rtc/rtc-mrst.c
index 332a2c4a891c..b2f096871a97 100644
--- a/drivers/rtc/rtc-mrst.c
+++ b/drivers/rtc/rtc-mrst.c
@@ -342,6 +342,8 @@ vrtc_mrst_do_probe(struct device *dev, struct resource *iomem, int rtc_irq)
342 342
343 mrst_rtc.irq = rtc_irq; 343 mrst_rtc.irq = rtc_irq;
344 mrst_rtc.iomem = iomem; 344 mrst_rtc.iomem = iomem;
345 mrst_rtc.dev = dev;
346 dev_set_drvdata(dev, &mrst_rtc);
345 347
346 mrst_rtc.rtc = rtc_device_register(driver_name, dev, 348 mrst_rtc.rtc = rtc_device_register(driver_name, dev,
347 &mrst_rtc_ops, THIS_MODULE); 349 &mrst_rtc_ops, THIS_MODULE);
@@ -350,8 +352,6 @@ vrtc_mrst_do_probe(struct device *dev, struct resource *iomem, int rtc_irq)
350 goto cleanup0; 352 goto cleanup0;
351 } 353 }
352 354
353 mrst_rtc.dev = dev;
354 dev_set_drvdata(dev, &mrst_rtc);
355 rename_region(iomem, dev_name(&mrst_rtc.rtc->dev)); 355 rename_region(iomem, dev_name(&mrst_rtc.rtc->dev));
356 356
357 spin_lock_irq(&rtc_lock); 357 spin_lock_irq(&rtc_lock);
@@ -376,9 +376,10 @@ vrtc_mrst_do_probe(struct device *dev, struct resource *iomem, int rtc_irq)
376 return 0; 376 return 0;
377 377
378cleanup1: 378cleanup1:
379 mrst_rtc.dev = NULL;
380 rtc_device_unregister(mrst_rtc.rtc); 379 rtc_device_unregister(mrst_rtc.rtc);
381cleanup0: 380cleanup0:
381 dev_set_drvdata(dev, NULL);
382 mrst_rtc.dev = NULL;
382 release_region(iomem->start, iomem->end + 1 - iomem->start); 383 release_region(iomem->start, iomem->end + 1 - iomem->start);
383 dev_err(dev, "rtc-mrst: unable to initialise\n"); 384 dev_err(dev, "rtc-mrst: unable to initialise\n");
384 return retval; 385 return retval;
diff --git a/drivers/rtc/rtc-x1205.c b/drivers/rtc/rtc-x1205.c
index 9aae49139a0a..b00aad2620d4 100644
--- a/drivers/rtc/rtc-x1205.c
+++ b/drivers/rtc/rtc-x1205.c
@@ -573,7 +573,7 @@ static int x1205_probe(struct i2c_client *client,
573 573
574 i2c_set_clientdata(client, rtc); 574 i2c_set_clientdata(client, rtc);
575 575
576 /* Check for power failures and eventualy enable the osc */ 576 /* Check for power failures and eventually enable the osc */
577 if ((err = x1205_get_status(client, &sr)) == 0) { 577 if ((err = x1205_get_status(client, &sr)) == 0) {
578 if (sr & X1205_SR_RTCF) { 578 if (sr & X1205_SR_RTCF) {
579 dev_err(&client->dev, 579 dev_err(&client->dev,