diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2016-09-02 15:21:45 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2016-12-14 16:33:37 +0100 |
commit | 236fb2ab95e9832880501d465d64eb2f2935b852 (patch) | |
tree | 7a3f44d63cc8faa4be38d23b39c506fb961aae5f /drivers/s390/crypto/zcrypt_cex4.c | |
parent | s390/zcrypt: Move the ap bus into kernel (diff) | |
download | linux-236fb2ab95e9832880501d465d64eb2f2935b852.tar.xz linux-236fb2ab95e9832880501d465d64eb2f2935b852.zip |
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_cex4.c')
-rw-r--r-- | drivers/s390/crypto/zcrypt_cex4.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/s390/crypto/zcrypt_cex4.c b/drivers/s390/crypto/zcrypt_cex4.c index ccb2e78ebf0e..e98bdbe45d2c 100644 --- a/drivers/s390/crypto/zcrypt_cex4.c +++ b/drivers/s390/crypto/zcrypt_cex4.c @@ -102,8 +102,8 @@ static int zcrypt_cex4_probe(struct ap_device *ap_dev) CEX4A_MAX_MOD_SIZE_2K; } zdev->short_crt = 1; - zdev->ops = zcrypt_msgtype_request(MSGTYPE50_NAME, - MSGTYPE50_VARIANT_DEFAULT); + zdev->ops = zcrypt_msgtype(MSGTYPE50_NAME, + MSGTYPE50_VARIANT_DEFAULT); } else if (ap_test_bit(&ap_dev->functions, AP_FUNC_COPRO)) { zdev = zcrypt_device_alloc(CEX4C_MAX_MESSAGE_SIZE); if (!zdev) @@ -120,8 +120,8 @@ static int zcrypt_cex4_probe(struct ap_device *ap_dev) zdev->max_mod_size = CEX4C_MAX_MOD_SIZE; zdev->max_exp_bit_length = CEX4C_MAX_MOD_SIZE; zdev->short_crt = 0; - zdev->ops = zcrypt_msgtype_request(MSGTYPE06_NAME, - MSGTYPE06_VARIANT_DEFAULT); + zdev->ops = zcrypt_msgtype(MSGTYPE06_NAME, + MSGTYPE06_VARIANT_DEFAULT); } else if (ap_test_bit(&ap_dev->functions, AP_FUNC_EP11)) { zdev = zcrypt_device_alloc(CEX4C_MAX_MESSAGE_SIZE); if (!zdev) @@ -138,8 +138,8 @@ static int zcrypt_cex4_probe(struct ap_device *ap_dev) zdev->max_mod_size = CEX4C_MAX_MOD_SIZE; zdev->max_exp_bit_length = CEX4C_MAX_MOD_SIZE; zdev->short_crt = 0; - zdev->ops = zcrypt_msgtype_request(MSGTYPE06_NAME, - MSGTYPE06_VARIANT_EP11); + zdev->ops = zcrypt_msgtype(MSGTYPE06_NAME, + MSGTYPE06_VARIANT_EP11); } break; } @@ -151,7 +151,6 @@ static int zcrypt_cex4_probe(struct ap_device *ap_dev) ap_dev->private = zdev; rc = zcrypt_device_register(zdev); if (rc) { - zcrypt_msgtype_release(zdev->ops); ap_dev->private = NULL; zcrypt_device_free(zdev); } @@ -165,12 +164,9 @@ static int zcrypt_cex4_probe(struct ap_device *ap_dev) static void zcrypt_cex4_remove(struct ap_device *ap_dev) { struct zcrypt_device *zdev = ap_dev->private; - struct zcrypt_ops *zops; if (zdev) { - zops = zdev->ops; zcrypt_device_unregister(zdev); - zcrypt_msgtype_release(zops); } } |