]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
s390/ap_bus: Convert timers to use timer_setup()
authorKees Cook <keescook@chromium.org>
Wed, 25 Oct 2017 10:27:37 +0000 (03:27 -0700)
committerHeiko Carstens <heiko.carstens@de.ibm.com>
Tue, 14 Nov 2017 10:01:41 +0000 (11:01 +0100)
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>
drivers/s390/crypto/ap_bus.c
drivers/s390/crypto/ap_bus.h
drivers/s390/crypto/ap_queue.c

index 8b5658b0bec368784f140d3bbe3b7f4428cfc8f3..faeba9db3d95999526fdf2ab0667751cd82ab1e0 100644 (file)
@@ -374,13 +374,13 @@ void ap_wait(enum ap_wait wait)
 
 /**
  * ap_request_timeout(): Handling of request timeouts
- * @data: Holds the AP device.
+ * @t: timer making this callback
  *
  * Handles request timeouts.
  */
-void ap_request_timeout(unsigned long data)
+void ap_request_timeout(struct timer_list *t)
 {
-       struct ap_queue *aq = (struct ap_queue *) data;
+       struct ap_queue *aq = from_timer(aq, t, timeout);
 
        if (ap_suspend_flag)
                return;
@@ -1203,7 +1203,7 @@ out:
        mod_timer(&ap_config_timer, jiffies + ap_config_time * HZ);
 }
 
-static void ap_config_timeout(unsigned long ptr)
+static void ap_config_timeout(struct timer_list *unused)
 {
        if (ap_suspend_flag)
                return;
@@ -1306,7 +1306,7 @@ int __init ap_module_init(void)
                goto out_bus;
 
        /* Setup the AP bus rescan timer. */
-       setup_timer(&ap_config_timer, ap_config_timeout, 0);
+       timer_setup(&ap_config_timer, ap_config_timeout, 0);
 
        /*
         * Setup the high resultion poll timer.
index 3a0e19d87e7cebf295dca38e22910430440f5435..7e45c4d08cad40e9124913abd79b715312cbd990 100644 (file)
@@ -241,7 +241,7 @@ void ap_flush_queue(struct ap_queue *aq);
 
 void *ap_airq_ptr(void);
 void ap_wait(enum ap_wait wait);
-void ap_request_timeout(unsigned long data);
+void ap_request_timeout(struct timer_list *t);
 void ap_bus_force_rescan(void);
 
 void ap_queue_init_reply(struct ap_queue *aq, struct ap_message *ap_msg);
index a550d40921e7b6e4c2636377140705230bc0134d..ba3a2e13b0ebe252effaa866910421234518e57d 100644 (file)
@@ -634,7 +634,7 @@ struct ap_queue *ap_queue_create(ap_qid_t qid, int device_type)
        INIT_LIST_HEAD(&aq->list);
        INIT_LIST_HEAD(&aq->pendingq);
        INIT_LIST_HEAD(&aq->requestq);
-       setup_timer(&aq->timeout, ap_request_timeout, (unsigned long) aq);
+       timer_setup(&aq->timeout, ap_request_timeout, 0);
 
        return aq;
 }