Skip to content
Permalink
Browse files
crypto/nx: Register and unregister VAS interface
Changes to create /dev/crypto/nx-gzip interface with VAS register
and to remove this interface with VAS unregister.

Signed-off-by: Haren Myneni <haren@linux.ibm.com>
  • Loading branch information
Haren Myneni authored and intel-lab-lkp committed Apr 11, 2021
1 parent 38ec599 commit 8650d30be9c22ee8fdc59063b993bfbafe88a328
Showing 1 changed file with 9 additions and 0 deletions.
@@ -9,6 +9,7 @@
*/

#include <asm/vio.h>
#include <asm/vas.h>

#include "nx-842.h"
#include "nx_csbcpb.h" /* struct nx_csbcpb */
@@ -1101,6 +1102,12 @@ static int __init nx842_pseries_init(void)
return ret;
}

ret = vas_register_api_pseries(THIS_MODULE, VAS_COP_TYPE_GZIP,
"nx-gzip");

if (ret)
pr_err("NX-GZIP is not supported. Returned=%d\n", ret);

return 0;
}

@@ -1111,6 +1118,8 @@ static void __exit nx842_pseries_exit(void)
struct nx842_devdata *old_devdata;
unsigned long flags;

vas_unregister_api_pseries();

crypto_unregister_alg(&nx842_pseries_alg);

spin_lock_irqsave(&devdata_mutex, flags);

0 comments on commit 8650d30

Please sign in to comment.