diff options
author | Miloslav Trmač <mitr@redhat.com> | 2010-07-28 00:17:24 +0200 |
---|---|---|
committer | Miloslav Trmač <mitr@redhat.com> | 2010-07-28 01:29:08 +0200 |
commit | 16a6c980b405924a26fec8508bb6181897402bec (patch) | |
tree | 6d594e04c8519de5319296d39239133abc1012d6 /ncr-int.h | |
parent | df4c072acb675a4c89882e3c92442978cf94eedd (diff) | |
download | cryptodev-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.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" @@ -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; |