diff options
author | Miloslav Trmač <mitr@redhat.com> | 2010-07-28 00:17:24 +0200 |
---|---|---|
committer | Miloslav Trmač <mitr@redhat.com> | 2010-08-08 04:55:05 +0200 |
commit | d17bb99719c47e33b18c47c868357c89b949d6db (patch) | |
tree | 48971a1259db511118a7dd7cb861b7e7750df5ea /ncr-int.h | |
parent | a11230422b13cea6ee34ffb81ff63deb6186628a (diff) | |
download | cryptodev-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.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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; |