summaryrefslogtreecommitdiffstats
path: root/ncr-int.h
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2010-07-28 00:17:24 +0200
committerMiloslav Trmač <mitr@redhat.com>2010-07-28 01:29:08 +0200
commit16a6c980b405924a26fec8508bb6181897402bec (patch)
tree6d594e04c8519de5319296d39239133abc1012d6 /ncr-int.h
parentdf4c072acb675a4c89882e3c92442978cf94eedd (diff)
downloadcryptodev-linux-16a6c980b405924a26fec8508bb6181897402bec.tar.gz
cryptodev-linux-16a6c980b405924a26fec8508bb6181897402bec.tar.xz
cryptodev-linux-16a6c980b405924a26fec8508bb6181897402bec.zip
Use <linux/idr.h> for key ID allocation and lookup
Diffstat (limited to 'ncr-int.h')
-rw-r--r--ncr-int.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/ncr-int.h b/ncr-int.h
index 7cd82eb..84761ff 100644
--- a/ncr-int.h
+++ b/ncr-int.h
@@ -1,6 +1,8 @@
#ifndef NCR_INT_H
# define NCR_INT_H
+#include <linux/idr.h>
+#include <linux/mutex.h>
#include "ncr.h"
#include <asm/atomic.h>
#include "cryptodev_int.h"
@@ -58,7 +60,6 @@ struct session_item_st {
};
struct key_item_st {
- struct list_head list;
/* This object is also not protected from concurrent access.
*/
ncr_key_type_t type;
@@ -99,7 +100,8 @@ struct list_sem_st {
*/
struct ncr_lists {
struct list_sem_st data;
- struct list_sem_st key;
+ struct mutex key_idr_mutex;
+ struct idr key_idr;
/* sessions */
struct list_sem_st sessions;