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-08-08 04:55:05 +0200
commitd17bb99719c47e33b18c47c868357c89b949d6db (patch)
tree48971a1259db511118a7dd7cb861b7e7750df5ea /ncr-int.h
parenta11230422b13cea6ee34ffb81ff63deb6186628a (diff)
downloadcryptodev-linux-d17bb99719c47e33b18c47c868357c89b949d6db.tar.gz
cryptodev-linux-d17bb99719c47e33b18c47c868357c89b949d6db.tar.xz
cryptodev-linux-d17bb99719c47e33b18c47c868357c89b949d6db.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 3fe58b8..60d64ad 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"
@@ -59,7 +61,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 {
* are here.
*/
struct ncr_lists {
- struct list_sem_st key;
+ struct mutex key_idr_mutex;
+ struct idr key_idr;
/* sessions */
struct list_sem_st sessions;