diff options
author | Holger Dengler <hd@linux.vnet.ibm.com> | 2012-05-16 08:08:22 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-05-16 08:42:52 -0400 |
commit | 54a8f5611d9189b3a8fbc9ace59a7a276eee58d8 (patch) | |
tree | 02c5bab3a0601b70faf8977d1e4eadd110c97d49 /drivers/s390/crypto/ap_bus.h | |
parent | 505e5ecfd3930bd1b429c36f10403d32a6c3c951 (diff) |
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 <hd@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/crypto/ap_bus.h')
-rw-r--r-- | drivers/s390/crypto/ap_bus.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/s390/crypto/ap_bus.h b/drivers/s390/crypto/ap_bus.h index d960a6309eec..726fc65809d8 100644 --- a/drivers/s390/crypto/ap_bus.h +++ b/drivers/s390/crypto/ap_bus.h | |||
@@ -136,9 +136,6 @@ struct ap_driver { | |||
136 | 136 | ||
137 | int (*probe)(struct ap_device *); | 137 | int (*probe)(struct ap_device *); |
138 | void (*remove)(struct ap_device *); | 138 | void (*remove)(struct ap_device *); |
139 | /* receive is called from tasklet context */ | ||
140 | void (*receive)(struct ap_device *, struct ap_message *, | ||
141 | struct ap_message *); | ||
142 | int request_timeout; /* request timeout in jiffies */ | 139 | int request_timeout; /* request timeout in jiffies */ |
143 | }; | 140 | }; |
144 | 141 | ||
@@ -183,6 +180,9 @@ struct ap_message { | |||
183 | 180 | ||
184 | void *private; /* ap driver private pointer. */ | 181 | void *private; /* ap driver private pointer. */ |
185 | unsigned int special:1; /* Used for special commands. */ | 182 | unsigned int special:1; /* Used for special commands. */ |
183 | /* receive is called from tasklet context */ | ||
184 | void (*receive)(struct ap_device *, struct ap_message *, | ||
185 | struct ap_message *); | ||
186 | }; | 186 | }; |
187 | 187 | ||
188 | #define AP_DEVICE(dt) \ | 188 | #define AP_DEVICE(dt) \ |
@@ -199,6 +199,7 @@ static inline void ap_init_message(struct ap_message *ap_msg) | |||
199 | ap_msg->psmid = 0; | 199 | ap_msg->psmid = 0; |
200 | ap_msg->length = 0; | 200 | ap_msg->length = 0; |
201 | ap_msg->special = 0; | 201 | ap_msg->special = 0; |
202 | ap_msg->receive = NULL; | ||
202 | } | 203 | } |
203 | 204 | ||
204 | /* | 205 | /* |