aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/auxdisplay
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-11-13 20:56:58 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-11-13 20:56:58 -0500
commit2bcc673101268dc50e52b83226c5bbf38391e16d (patch)
tree0cdaf6affa8b05d436c2e8b80ff23e8c7f03a30a /drivers/auxdisplay
parent670310dfbae0eefe7318ff6a61e29e67a7a7bbce (diff)
parentb24591e2fcf852ad7ad2ccf745c8220bf378d312 (diff)
Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer updates from Thomas Gleixner: "Yet another big pile of changes: - More year 2038 work from Arnd slowly reaching the point where we need to think about the syscalls themself. - A new timer function which allows to conditionally (re)arm a timer only when it's either not running or the new expiry time is sooner than the armed expiry time. This allows to use a single timer for multiple timeout requirements w/o caring about the first expiry time at the call site. - A new NMI safe accessor to clock real time for the printk timestamp work. Can be used by tracing, perf as well if required. - A large number of timer setup conversions from Kees which got collected here because either maintainers requested so or they simply got ignored. As Kees pointed out already there are a few trivial merge conflicts and some redundant commits which was unavoidable due to the size of this conversion effort. - Avoid a redundant iteration in the timer wheel softirq processing. - Provide a mechanism to treat RTC implementations depending on their hardware properties, i.e. don't inflict the write at the 0.5 seconds boundary which originates from the PC CMOS RTC to all RTCs. No functional change as drivers need to be updated separately. - The usual small updates to core code clocksource drivers. Nothing really exciting" * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (111 commits) timers: Add a function to start/reduce a timer pstore: Use ktime_get_real_fast_ns() instead of __getnstimeofday() timer: Prepare to change all DEFINE_TIMER() callbacks netfilter: ipvs: Convert timers to use timer_setup() scsi: qla2xxx: Convert timers to use timer_setup() block/aoe: discover_timer: Convert timers to use timer_setup() ide: Convert timers to use timer_setup() drbd: Convert timers to use timer_setup() mailbox: Convert timers to use timer_setup() crypto: Convert timers to use timer_setup() drivers/pcmcia: omap1: Fix error in automated timer conversion ARM: footbridge: Fix typo in timer conversion drivers/sgi-xp: Convert timers to use timer_setup() drivers/pcmcia: Convert timers to use timer_setup() drivers/memstick: Convert timers to use timer_setup() drivers/macintosh: Convert timers to use timer_setup() hwrng/xgene-rng: Convert timers to use timer_setup() auxdisplay: Convert timers to use timer_setup() sparc/led: Convert timers to use timer_setup() mips: ip22/32: Convert timers to use timer_setup() ...
Diffstat (limited to 'drivers/auxdisplay')
-rw-r--r--drivers/auxdisplay/img-ascii-lcd.c10
-rw-r--r--drivers/auxdisplay/panel.c4
2 files changed, 6 insertions, 8 deletions
diff --git a/drivers/auxdisplay/img-ascii-lcd.c b/drivers/auxdisplay/img-ascii-lcd.c
index a9020f82eea7..db040b378224 100644
--- a/drivers/auxdisplay/img-ascii-lcd.c
+++ b/drivers/auxdisplay/img-ascii-lcd.c
@@ -229,9 +229,9 @@ MODULE_DEVICE_TABLE(of, img_ascii_lcd_matches);
229 * Scroll the current message along the LCD by one character, rearming the 229 * Scroll the current message along the LCD by one character, rearming the
230 * timer if required. 230 * timer if required.
231 */ 231 */
232static void img_ascii_lcd_scroll(unsigned long arg) 232static void img_ascii_lcd_scroll(struct timer_list *t)
233{ 233{
234 struct img_ascii_lcd_ctx *ctx = (struct img_ascii_lcd_ctx *)arg; 234 struct img_ascii_lcd_ctx *ctx = from_timer(ctx, t, timer);
235 unsigned int i, ch = ctx->scroll_pos; 235 unsigned int i, ch = ctx->scroll_pos;
236 unsigned int num_chars = ctx->cfg->num_chars; 236 unsigned int num_chars = ctx->cfg->num_chars;
237 237
@@ -299,7 +299,7 @@ static int img_ascii_lcd_display(struct img_ascii_lcd_ctx *ctx,
299 ctx->scroll_pos = 0; 299 ctx->scroll_pos = 0;
300 300
301 /* update the LCD */ 301 /* update the LCD */
302 img_ascii_lcd_scroll((unsigned long)ctx); 302 img_ascii_lcd_scroll(&ctx->timer);
303 303
304 return 0; 304 return 0;
305} 305}
@@ -395,9 +395,7 @@ static int img_ascii_lcd_probe(struct platform_device *pdev)
395 ctx->scroll_rate = HZ / 2; 395 ctx->scroll_rate = HZ / 2;
396 396
397 /* initialise a timer for scrolling the message */ 397 /* initialise a timer for scrolling the message */
398 init_timer(&ctx->timer); 398 timer_setup(&ctx->timer, img_ascii_lcd_scroll, 0);
399 ctx->timer.function = img_ascii_lcd_scroll;
400 ctx->timer.data = (unsigned long)ctx;
401 399
402 platform_set_drvdata(pdev, ctx); 400 platform_set_drvdata(pdev, ctx);
403 401
diff --git a/drivers/auxdisplay/panel.c b/drivers/auxdisplay/panel.c
index 6911acd896d9..ea7869c0d7f9 100644
--- a/drivers/auxdisplay/panel.c
+++ b/drivers/auxdisplay/panel.c
@@ -1396,7 +1396,7 @@ static void panel_process_inputs(void)
1396 } 1396 }
1397} 1397}
1398 1398
1399static void panel_scan_timer(void) 1399static void panel_scan_timer(struct timer_list *unused)
1400{ 1400{
1401 if (keypad.enabled && keypad_initialized) { 1401 if (keypad.enabled && keypad_initialized) {
1402 if (spin_trylock_irq(&pprt_lock)) { 1402 if (spin_trylock_irq(&pprt_lock)) {
@@ -1421,7 +1421,7 @@ static void init_scan_timer(void)
1421 if (scan_timer.function) 1421 if (scan_timer.function)
1422 return; /* already started */ 1422 return; /* already started */
1423 1423
1424 setup_timer(&scan_timer, (void *)&panel_scan_timer, 0); 1424 timer_setup(&scan_timer, panel_scan_timer, 0);
1425 scan_timer.expires = jiffies + INPUT_POLL_TIME; 1425 scan_timer.expires = jiffies + INPUT_POLL_TIME;
1426 add_timer(&scan_timer); 1426 add_timer(&scan_timer);
1427} 1427}