aboutsummaryrefslogtreecommitdiff
path: root/drivers/s390/crypto/zcrypt_pcixcc.c
diff options
context:
space:
mode:
authorMartin Schwidefsky2016-09-02 15:21:45 +0200
committerMartin Schwidefsky2016-12-14 16:33:37 +0100
commit236fb2ab95e9832880501d465d64eb2f2935b852 (patch)
tree7a3f44d63cc8faa4be38d23b39c506fb961aae5f /drivers/s390/crypto/zcrypt_pcixcc.c
parentfc1d3f02544a6fd5f417921b57c663388586a17a (diff)
s390/zcrypt: simplify message type handling
Now that the message type modules are linked with the zcrypt_api into a single module the zcrypt_ops_list is initialized by the module init function of the zcyppt.ko module. After that the list is static and all message types are present. Drop the zcrypt_ops_list_lock spinlock and the module handling in regard to the message types. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/crypto/zcrypt_pcixcc.c')
-rw-r--r--drivers/s390/crypto/zcrypt_pcixcc.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/s390/crypto/zcrypt_pcixcc.c b/drivers/s390/crypto/zcrypt_pcixcc.c
index df8f0c4dacb7..8491541f72cf 100644
--- a/drivers/s390/crypto/zcrypt_pcixcc.c
+++ b/drivers/s390/crypto/zcrypt_pcixcc.c
@@ -322,11 +322,11 @@ static int zcrypt_pcixcc_probe(struct ap_device *ap_dev)
return rc;
}
if (rc)
- zdev->ops = zcrypt_msgtype_request(MSGTYPE06_NAME,
- MSGTYPE06_VARIANT_DEFAULT);
+ zdev->ops = zcrypt_msgtype(MSGTYPE06_NAME,
+ MSGTYPE06_VARIANT_DEFAULT);
else
- zdev->ops = zcrypt_msgtype_request(MSGTYPE06_NAME,
- MSGTYPE06_VARIANT_NORNG);
+ zdev->ops = zcrypt_msgtype(MSGTYPE06_NAME,
+ MSGTYPE06_VARIANT_NORNG);
ap_device_init_reply(ap_dev, &zdev->reply);
ap_dev->private = zdev;
rc = zcrypt_device_register(zdev);
@@ -336,7 +336,6 @@ static int zcrypt_pcixcc_probe(struct ap_device *ap_dev)
out_free:
ap_dev->private = NULL;
- zcrypt_msgtype_release(zdev->ops);
zcrypt_device_free(zdev);
return rc;
}
@@ -348,10 +347,8 @@ static int zcrypt_pcixcc_probe(struct ap_device *ap_dev)
static void zcrypt_pcixcc_remove(struct ap_device *ap_dev)
{
struct zcrypt_device *zdev = ap_dev->private;
- struct zcrypt_ops *zops = zdev->ops;
zcrypt_device_unregister(zdev);
- zcrypt_msgtype_release(zops);
}
int __init zcrypt_pcixcc_init(void)