From 54a8f5611d9189b3a8fbc9ace59a7a276eee58d8 Mon Sep 17 00:00:00 2001 From: Holger Dengler Date: Wed, 16 May 2012 14:08:22 +0200 Subject: s390/ap: move receive callback to message struct Move the receive callback from zdev_driver to ap_message structure to get a more flexible asynchronous ap message handling. Signed-off-by: Holger Dengler Signed-off-by: Martin Schwidefsky --- drivers/s390/crypto/ap_bus.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/s390/crypto/ap_bus.h') diff --git a/drivers/s390/crypto/ap_bus.h b/drivers/s390/crypto/ap_bus.h index d960a63..726fc65 100644 --- a/drivers/s390/crypto/ap_bus.h +++ b/drivers/s390/crypto/ap_bus.h @@ -136,9 +136,6 @@ struct ap_driver { int (*probe)(struct ap_device *); void (*remove)(struct ap_device *); - /* receive is called from tasklet context */ - void (*receive)(struct ap_device *, struct ap_message *, - struct ap_message *); int request_timeout; /* request timeout in jiffies */ }; @@ -183,6 +180,9 @@ struct ap_message { void *private; /* ap driver private pointer. */ unsigned int special:1; /* Used for special commands. */ + /* receive is called from tasklet context */ + void (*receive)(struct ap_device *, struct ap_message *, + struct ap_message *); }; #define AP_DEVICE(dt) \ @@ -199,6 +199,7 @@ static inline void ap_init_message(struct ap_message *ap_msg) ap_msg->psmid = 0; ap_msg->length = 0; ap_msg->special = 0; + ap_msg->receive = NULL; } /* -- cgit v1.1