aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMike Frysinger <vapier.adi@gmail.com>2008-08-05 16:01:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-08-05 17:33:47 -0400
commit605eb8b3c05e970caf71c48f693efe33c212fb7b (patch)
tree894853c743a70d0f0ad3442b51cd8782d93de04e /drivers
parent813006f4bb4a39afdde8ab2e3559971c029d1dc0 (diff)
blackfin RTC driver: don't bother passing the rtc struct down to bfin_rtc_int_{set,clear} since it isnt needed (shaves off ~100bytes)
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Cc: David Brownell <david-b@pacbell.net> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/rtc/rtc-bfin.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/rtc/rtc-bfin.c b/drivers/rtc/rtc-bfin.c
index 23b991d41ef1..56656dd6b2c1 100644
--- a/drivers/rtc/rtc-bfin.c
+++ b/drivers/rtc/rtc-bfin.c
@@ -238,12 +238,12 @@ static void bfin_rtc_release(struct device *dev)
238 free_irq(IRQ_RTC, dev); 238 free_irq(IRQ_RTC, dev);
239} 239}
240 240
241static void bfin_rtc_int_set(struct bfin_rtc *rtc, u16 rtc_int) 241static void bfin_rtc_int_set(u16 rtc_int)
242{ 242{
243 bfin_write_RTC_ISTAT(rtc_int); 243 bfin_write_RTC_ISTAT(rtc_int);
244 bfin_write_RTC_ICTL(bfin_read_RTC_ICTL() | rtc_int); 244 bfin_write_RTC_ICTL(bfin_read_RTC_ICTL() | rtc_int);
245} 245}
246static void bfin_rtc_int_clear(struct bfin_rtc *rtc, u16 rtc_int) 246static void bfin_rtc_int_clear(u16 rtc_int)
247{ 247{
248 bfin_write_RTC_ICTL(bfin_read_RTC_ICTL() & rtc_int); 248 bfin_write_RTC_ICTL(bfin_read_RTC_ICTL() & rtc_int);
249} 249}
@@ -252,7 +252,7 @@ static void bfin_rtc_int_set_alarm(struct bfin_rtc *rtc)
252 /* Blackfin has different bits for whether the alarm is 252 /* Blackfin has different bits for whether the alarm is
253 * more than 24 hours away. 253 * more than 24 hours away.
254 */ 254 */
255 bfin_rtc_int_set(rtc, (rtc->rtc_alarm.tm_yday == -1 ? RTC_ISTAT_ALARM : RTC_ISTAT_ALARM_DAY)); 255 bfin_rtc_int_set(rtc->rtc_alarm.tm_yday == -1 ? RTC_ISTAT_ALARM : RTC_ISTAT_ALARM_DAY);
256} 256}
257static int bfin_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long arg) 257static int bfin_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long arg)
258{ 258{
@@ -266,21 +266,21 @@ static int bfin_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long ar
266 switch (cmd) { 266 switch (cmd) {
267 case RTC_PIE_ON: 267 case RTC_PIE_ON:
268 dev_dbg_stamp(dev); 268 dev_dbg_stamp(dev);
269 bfin_rtc_int_set(rtc, RTC_ISTAT_STOPWATCH); 269 bfin_rtc_int_set(RTC_ISTAT_STOPWATCH);
270 bfin_write_RTC_SWCNT(rtc->rtc_dev->irq_freq); 270 bfin_write_RTC_SWCNT(rtc->rtc_dev->irq_freq);
271 break; 271 break;
272 case RTC_PIE_OFF: 272 case RTC_PIE_OFF:
273 dev_dbg_stamp(dev); 273 dev_dbg_stamp(dev);
274 bfin_rtc_int_clear(rtc, ~RTC_ISTAT_STOPWATCH); 274 bfin_rtc_int_clear(~RTC_ISTAT_STOPWATCH);
275 break; 275 break;
276 276
277 case RTC_UIE_ON: 277 case RTC_UIE_ON:
278 dev_dbg_stamp(dev); 278 dev_dbg_stamp(dev);
279 bfin_rtc_int_set(rtc, RTC_ISTAT_SEC); 279 bfin_rtc_int_set(RTC_ISTAT_SEC);
280 break; 280 break;
281 case RTC_UIE_OFF: 281 case RTC_UIE_OFF:
282 dev_dbg_stamp(dev); 282 dev_dbg_stamp(dev);
283 bfin_rtc_int_clear(rtc, ~RTC_ISTAT_SEC); 283 bfin_rtc_int_clear(~RTC_ISTAT_SEC);
284 break; 284 break;
285 285
286 case RTC_AIE_ON: 286 case RTC_AIE_ON:
@@ -289,7 +289,7 @@ static int bfin_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long ar
289 break; 289 break;
290 case RTC_AIE_OFF: 290 case RTC_AIE_OFF:
291 dev_dbg_stamp(dev); 291 dev_dbg_stamp(dev);
292 bfin_rtc_int_clear(rtc, ~(RTC_ISTAT_ALARM | RTC_ISTAT_ALARM_DAY)); 292 bfin_rtc_int_clear(~(RTC_ISTAT_ALARM | RTC_ISTAT_ALARM_DAY));
293 break; 293 break;
294 294
295 default: 295 default:
@@ -435,12 +435,10 @@ static int __devexit bfin_rtc_remove(struct platform_device *pdev)
435#ifdef CONFIG_PM 435#ifdef CONFIG_PM
436static int bfin_rtc_suspend(struct platform_device *pdev, pm_message_t state) 436static int bfin_rtc_suspend(struct platform_device *pdev, pm_message_t state)
437{ 437{
438 struct bfin_rtc *rtc = dev_get_drvdata(&pdev->dev);
439
440 if (device_may_wakeup(&pdev->dev)) 438 if (device_may_wakeup(&pdev->dev))
441 enable_irq_wake(IRQ_RTC); 439 enable_irq_wake(IRQ_RTC);
442 else 440 else
443 bfin_rtc_int_clear(rtc, -1); 441 bfin_rtc_int_clear(-1);
444 442
445 return 0; 443 return 0;
446} 444}