summaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/sclp_tty.c
diff options
context:
space:
mode:
authorHimanshu Jha <himanshujha199640@gmail.com>2017-09-24 14:00:14 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2017-09-28 07:29:43 +0200
commit8179c7ba109a8eca5fdc214d695ef009ee2fa9cb (patch)
tree6ba20c009efda3aef8a4284d1188293dd71f5130 /drivers/s390/char/sclp_tty.c
parents390/cpumf: remove superfluous nr_cpumask_bits check (diff)
downloadlinux-8179c7ba109a8eca5fdc214d695ef009ee2fa9cb.tar.xz
linux-8179c7ba109a8eca5fdc214d695ef009ee2fa9cb.zip
s390/sclp: Use setup_timer and mod_timer
Use setup_timer and mod_timer API instead of structure assignments. This is done using Coccinelle and semantic patch used for this as follows: @@ expression x,y,z,a,b; @@ -init_timer (&x); +setup_timer (&x, y, z); +mod_timer (&a, b); -x.function = y; -x.data = z; -x.expires = b; -add_timer(&a); Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/char/sclp_tty.c')
-rw-r--r--drivers/s390/char/sclp_tty.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/s390/char/sclp_tty.c b/drivers/s390/char/sclp_tty.c
index 236b736ae136..469487e09671 100644
--- a/drivers/s390/char/sclp_tty.c
+++ b/drivers/s390/char/sclp_tty.c
@@ -217,11 +217,8 @@ static int sclp_tty_write_string(const unsigned char *str, int count, int may_fa
/* Setup timer to output current console buffer after 1/10 second */
if (sclp_ttybuf && sclp_chars_in_buffer(sclp_ttybuf) &&
!timer_pending(&sclp_tty_timer)) {
- init_timer(&sclp_tty_timer);
- sclp_tty_timer.function = sclp_tty_timeout;
- sclp_tty_timer.data = 0UL;
- sclp_tty_timer.expires = jiffies + HZ/10;
- add_timer(&sclp_tty_timer);
+ setup_timer(&sclp_tty_timer, sclp_tty_timeout, 0UL);
+ mod_timer(&sclp_tty_timer, jiffies + HZ / 10);
}
spin_unlock_irqrestore(&sclp_tty_lock, flags);
out: