Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Mike Frysinger and committed by
Linus Torvalds
605eb8b3 813006f4

+9 -11
+9 -11
drivers/rtc/rtc-bfin.c
··· 238 238 free_irq(IRQ_RTC, dev); 239 239 } 240 240 241 - static void bfin_rtc_int_set(struct bfin_rtc *rtc, u16 rtc_int) 241 + static void bfin_rtc_int_set(u16 rtc_int) 242 242 { 243 243 bfin_write_RTC_ISTAT(rtc_int); 244 244 bfin_write_RTC_ICTL(bfin_read_RTC_ICTL() | rtc_int); 245 245 } 246 - static void bfin_rtc_int_clear(struct bfin_rtc *rtc, u16 rtc_int) 246 + static void bfin_rtc_int_clear(u16 rtc_int) 247 247 { 248 248 bfin_write_RTC_ICTL(bfin_read_RTC_ICTL() & rtc_int); 249 249 } ··· 252 252 /* Blackfin has different bits for whether the alarm is 253 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 } 257 257 static int bfin_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long arg) 258 258 { ··· 266 266 switch (cmd) { 267 267 case RTC_PIE_ON: 268 268 dev_dbg_stamp(dev); 269 - bfin_rtc_int_set(rtc, RTC_ISTAT_STOPWATCH); 269 + bfin_rtc_int_set(RTC_ISTAT_STOPWATCH); 270 270 bfin_write_RTC_SWCNT(rtc->rtc_dev->irq_freq); 271 271 break; 272 272 case RTC_PIE_OFF: 273 273 dev_dbg_stamp(dev); 274 - bfin_rtc_int_clear(rtc, ~RTC_ISTAT_STOPWATCH); 274 + bfin_rtc_int_clear(~RTC_ISTAT_STOPWATCH); 275 275 break; 276 276 277 277 case RTC_UIE_ON: 278 278 dev_dbg_stamp(dev); 279 - bfin_rtc_int_set(rtc, RTC_ISTAT_SEC); 279 + bfin_rtc_int_set(RTC_ISTAT_SEC); 280 280 break; 281 281 case RTC_UIE_OFF: 282 282 dev_dbg_stamp(dev); 283 - bfin_rtc_int_clear(rtc, ~RTC_ISTAT_SEC); 283 + bfin_rtc_int_clear(~RTC_ISTAT_SEC); 284 284 break; 285 285 286 286 case RTC_AIE_ON: ··· 289 289 break; 290 290 case RTC_AIE_OFF: 291 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 293 break; 294 294 295 295 default: ··· 435 435 #ifdef CONFIG_PM 436 436 static 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 438 if (device_may_wakeup(&pdev->dev)) 441 439 enable_irq_wake(IRQ_RTC); 442 440 else 443 - bfin_rtc_int_clear(rtc, -1); 441 + bfin_rtc_int_clear(-1); 444 442 445 443 return 0; 446 444 }