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>
This commit is contained in:

committed by
Martin Schwidefsky

parent
505e5ecfd3
commit
54a8f5611d
@@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user