summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-25 06:27:37 -0400
committerHeiko Carstens <heiko.carstens@de.ibm.com>2017-11-14 05:01:41 -0500
commitcefbeb5df56e1daf0adda8ca5eecee03c5084af6 (patch)
tree482011c53f7a9fdaf701cad2f2bfbdef4cc1754b
parentc9602ee7d14a72086d10b50ac68e1ea5c01e7579 (diff)
s390/ap_bus: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Harald Freudenberger <freude@de.ibm.com> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
-rw-r--r--drivers/s390/crypto/ap_bus.c10
-rw-r--r--drivers/s390/crypto/ap_bus.h2
-rw-r--r--drivers/s390/crypto/ap_queue.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c
index 8b5658b0bec3..faeba9db3d95 100644
--- a/drivers/s390/crypto/ap_bus.c
+++ b/drivers/s390/crypto/ap_bus.c
@@ -374,13 +374,13 @@ void ap_wait(enum ap_wait wait)
374 374
375/** 375/**
376 * ap_request_timeout(): Handling of request timeouts 376 * ap_request_timeout(): Handling of request timeouts
377 * @data: Holds the AP device. 377 * @t: timer making this callback
378 * 378 *
379 * Handles request timeouts. 379 * Handles request timeouts.
380 */ 380 */
381void ap_request_timeout(unsigned long data) 381void ap_request_timeout(struct timer_list *t)
382{ 382{
383 struct ap_queue *aq = (struct ap_queue *) data; 383 struct ap_queue *aq = from_timer(aq, t, timeout);
384 384
385 if (ap_suspend_flag) 385 if (ap_suspend_flag)
386 return; 386 return;
@@ -1203,7 +1203,7 @@ out:
1203 mod_timer(&ap_config_timer, jiffies + ap_config_time * HZ); 1203 mod_timer(&ap_config_timer, jiffies + ap_config_time * HZ);
1204} 1204}
1205 1205
1206static void ap_config_timeout(unsigned long ptr) 1206static void ap_config_timeout(struct timer_list *unused)
1207{ 1207{
1208 if (ap_suspend_flag) 1208 if (ap_suspend_flag)
1209 return; 1209 return;
@@ -1306,7 +1306,7 @@ int __init ap_module_init(void)
1306 goto out_bus; 1306 goto out_bus;
1307 1307
1308 /* Setup the AP bus rescan timer. */ 1308 /* Setup the AP bus rescan timer. */
1309 setup_timer(&ap_config_timer, ap_config_timeout, 0); 1309 timer_setup(&ap_config_timer, ap_config_timeout, 0);
1310 1310
1311 /* 1311 /*
1312 * Setup the high resultion poll timer. 1312 * Setup the high resultion poll timer.
diff --git a/drivers/s390/crypto/ap_bus.h b/drivers/s390/crypto/ap_bus.h
index 3a0e19d87e7c..7e45c4d08cad 100644
--- a/drivers/s390/crypto/ap_bus.h
+++ b/drivers/s390/crypto/ap_bus.h
@@ -241,7 +241,7 @@ void ap_flush_queue(struct ap_queue *aq);
241 241
242void *ap_airq_ptr(void); 242void *ap_airq_ptr(void);
243void ap_wait(enum ap_wait wait); 243void ap_wait(enum ap_wait wait);
244void ap_request_timeout(unsigned long data); 244void ap_request_timeout(struct timer_list *t);
245void ap_bus_force_rescan(void); 245void ap_bus_force_rescan(void);
246 246
247void ap_queue_init_reply(struct ap_queue *aq, struct ap_message *ap_msg); 247void ap_queue_init_reply(struct ap_queue *aq, struct ap_message *ap_msg);
diff --git a/drivers/s390/crypto/ap_queue.c b/drivers/s390/crypto/ap_queue.c
index a550d40921e7..ba3a2e13b0eb 100644
--- a/drivers/s390/crypto/ap_queue.c
+++ b/drivers/s390/crypto/ap_queue.c
@@ -634,7 +634,7 @@ struct ap_queue *ap_queue_create(ap_qid_t qid, int device_type)
634 INIT_LIST_HEAD(&aq->list); 634 INIT_LIST_HEAD(&aq->list);
635 INIT_LIST_HEAD(&aq->pendingq); 635 INIT_LIST_HEAD(&aq->pendingq);
636 INIT_LIST_HEAD(&aq->requestq); 636 INIT_LIST_HEAD(&aq->requestq);
637 setup_timer(&aq->timeout, ap_request_timeout, (unsigned long) aq); 637 timer_setup(&aq->timeout, ap_request_timeout, 0);
638 638
639 return aq; 639 return aq;
640} 640}