From c8f69207e6d5fb654814833676f5f786084a8576 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Fri, 4 Jun 2010 07:28:19 +0200 Subject: Some updates in the server approach (not working yet). --- cryptodev_main.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'cryptodev_main.c') diff --git a/cryptodev_main.c b/cryptodev_main.c index 460e3d3..58ae45b 100644 --- a/cryptodev_main.c +++ b/cryptodev_main.c @@ -510,7 +510,6 @@ cryptodev_open(struct inode *inode, struct file *filp) init_MUTEX(&pcr->fcrypt.sem); INIT_LIST_HEAD(&pcr->fcrypt.list); - pcr->ncr = ncr_init_lists(); if (pcr->ncr == NULL) { kfree(pcr); @@ -730,9 +729,17 @@ cryptodev_register(void) ncr_limits_init(); + rc = ncr_gnl_init(); + if (rc < 0) { + ncr_limits_deinit(); + return rc; + } + rc = misc_register (&cryptodev); if (unlikely(rc)) { - printk(KERN_ERR PFX "registeration of /dev/crypto failed\n"); + ncr_gnl_deinit(); + ncr_limits_deinit(); + printk(KERN_ERR PFX "registration of /dev/crypto failed\n"); return rc; } @@ -742,8 +749,9 @@ cryptodev_register(void) static void cryptodev_deregister(void) { - ncr_limits_deinit(); misc_deregister(&cryptodev); + ncr_gnl_deinit(); + ncr_limits_deinit(); } /* ====== Module init/exit ====== */ -- cgit