aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorMarcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br>2010-10-18 17:33:53 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-11-10 08:34:09 -0500
commita404ad1ff593589bdd34c48ebecddada9edbfaf3 (patch)
tree89b9da677268c4baff3651f3f34e1fd556809e6a /drivers/rtc
parentd03f322c41890a86bf64d00314f0ec72738a7f21 (diff)
ARM: 6452/1: Fix checkpatch.pl issues in drivers/rtc/rtc-sa1100.c.
This patch fixes checkpatch.pl issues in drivers/rtc/rtc-sa1100.c, which I will later modify. Signed-off-by: Marcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-sa1100.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/rtc/rtc-sa1100.c b/drivers/rtc/rtc-sa1100.c
index e4a44b641702..e19ed0f6dca0 100644
--- a/drivers/rtc/rtc-sa1100.c
+++ b/drivers/rtc/rtc-sa1100.c
@@ -39,7 +39,7 @@
39#include <mach/regs-ost.h> 39#include <mach/regs-ost.h>
40#endif 40#endif
41 41
42#define RTC_DEF_DIVIDER 32768 - 1 42#define RTC_DEF_DIVIDER (32768 - 1)
43#define RTC_DEF_TRIM 0 43#define RTC_DEF_TRIM 0
44 44
45static unsigned long rtc_freq = 1024; 45static unsigned long rtc_freq = 1024;
@@ -61,7 +61,8 @@ static inline int rtc_periodic_alarm(struct rtc_time *tm)
61 * Calculate the next alarm time given the requested alarm time mask 61 * Calculate the next alarm time given the requested alarm time mask
62 * and the current time. 62 * and the current time.
63 */ 63 */
64static void rtc_next_alarm_time(struct rtc_time *next, struct rtc_time *now, struct rtc_time *alrm) 64static void rtc_next_alarm_time(struct rtc_time *next, struct rtc_time *now,
65 struct rtc_time *alrm)
65{ 66{
66 unsigned long next_time; 67 unsigned long next_time;
67 unsigned long now_time; 68 unsigned long now_time;
@@ -178,7 +179,7 @@ static int sa1100_rtc_read_callback(struct device *dev, int data)
178 * Here we compare (match - OSCR) 8 instead of 0 -- 179 * Here we compare (match - OSCR) 8 instead of 0 --
179 * see comment in pxa_timer_interrupt() for explanation. 180 * see comment in pxa_timer_interrupt() for explanation.
180 */ 181 */
181 while( (signed long)((osmr1 = OSMR1) - OSCR) <= 8 ) { 182 while ((signed long)((osmr1 = OSMR1) - OSCR) <= 8) {
182 data += 0x100; 183 data += 0x100;
183 OSSR = OSSR_M1; /* clear match on timer 1 */ 184 OSSR = OSSR_M1; /* clear match on timer 1 */
184 OSMR1 = osmr1 + period; 185 OSMR1 = osmr1 + period;
@@ -192,19 +193,19 @@ static int sa1100_rtc_open(struct device *dev)
192 int ret; 193 int ret;
193 194
194 ret = request_irq(IRQ_RTC1Hz, sa1100_rtc_interrupt, IRQF_DISABLED, 195 ret = request_irq(IRQ_RTC1Hz, sa1100_rtc_interrupt, IRQF_DISABLED,
195 "rtc 1Hz", dev); 196 "rtc 1Hz", dev);
196 if (ret) { 197 if (ret) {
197 dev_err(dev, "IRQ %d already in use.\n", IRQ_RTC1Hz); 198 dev_err(dev, "IRQ %d already in use.\n", IRQ_RTC1Hz);
198 goto fail_ui; 199 goto fail_ui;
199 } 200 }
200 ret = request_irq(IRQ_RTCAlrm, sa1100_rtc_interrupt, IRQF_DISABLED, 201 ret = request_irq(IRQ_RTCAlrm, sa1100_rtc_interrupt, IRQF_DISABLED,
201 "rtc Alrm", dev); 202 "rtc Alrm", dev);
202 if (ret) { 203 if (ret) {
203 dev_err(dev, "IRQ %d already in use.\n", IRQ_RTCAlrm); 204 dev_err(dev, "IRQ %d already in use.\n", IRQ_RTCAlrm);
204 goto fail_ai; 205 goto fail_ai;
205 } 206 }
206 ret = request_irq(IRQ_OST1, timer1_interrupt, IRQF_DISABLED, 207 ret = request_irq(IRQ_OST1, timer1_interrupt, IRQF_DISABLED,
207 "rtc timer", dev); 208 "rtc timer", dev);
208 if (ret) { 209 if (ret) {
209 dev_err(dev, "IRQ %d already in use.\n", IRQ_OST1); 210 dev_err(dev, "IRQ %d already in use.\n", IRQ_OST1);
210 goto fail_pi; 211 goto fail_pi;
@@ -236,7 +237,7 @@ static void sa1100_rtc_release(struct device *dev)
236static int sa1100_rtc_ioctl(struct device *dev, unsigned int cmd, 237static int sa1100_rtc_ioctl(struct device *dev, unsigned int cmd,
237 unsigned long arg) 238 unsigned long arg)
238{ 239{
239 switch(cmd) { 240 switch (cmd) {
240 case RTC_AIE_OFF: 241 case RTC_AIE_OFF:
241 spin_lock_irq(&sa1100_rtc_lock); 242 spin_lock_irq(&sa1100_rtc_lock);
242 RTSR &= ~RTSR_ALE; 243 RTSR &= ~RTSR_ALE;
@@ -364,7 +365,8 @@ static int sa1100_rtc_probe(struct platform_device *pdev)
364 */ 365 */
365 if (RTTR == 0) { 366 if (RTTR == 0) {
366 RTTR = RTC_DEF_DIVIDER + (RTC_DEF_TRIM << 16); 367 RTTR = RTC_DEF_DIVIDER + (RTC_DEF_TRIM << 16);
367 dev_warn(&pdev->dev, "warning: initializing default clock divider/trim value\n"); 368 dev_warn(&pdev->dev, "warning: "
369 "initializing default clock divider/trim value\n");
368 /* The current RTC value probably doesn't make sense either */ 370 /* The current RTC value probably doesn't make sense either */
369 RCNR = 0; 371 RCNR = 0;
370 } 372 }
@@ -386,7 +388,7 @@ static int sa1100_rtc_remove(struct platform_device *pdev)
386{ 388{
387 struct rtc_device *rtc = platform_get_drvdata(pdev); 389 struct rtc_device *rtc = platform_get_drvdata(pdev);
388 390
389 if (rtc) 391 if (rtc)
390 rtc_device_unregister(rtc); 392 rtc_device_unregister(rtc);
391 393
392 return 0; 394 return 0;