]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/key.h
keys: make key_serial() a function if CONFIG_KEYS=y
[linux-2.6-omap-h63xx.git] / include / linux / key.h
index 2effd031a817db384ca6df1de31e44237111d7cc..c45c962d1cc527e82aa37f8c76385d87fc236c4a 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/list.h>
 #include <linux/rbtree.h>
 #include <linux/rcupdate.h>
+#include <linux/sysctl.h>
 #include <asm/atomic.h>
 
 #ifdef __KERNEL__
@@ -263,7 +264,14 @@ extern int keyring_add_key(struct key *keyring,
 
 extern struct key *key_lookup(key_serial_t id);
 
-#define key_serial(key) ((key) ? (key)->serial : 0)
+static inline key_serial_t key_serial(struct key *key)
+{
+       return key ? key->serial : 0;
+}
+
+#ifdef CONFIG_SYSCTL
+extern ctl_table key_sysctls[];
+#endif
 
 /*
  * the userspace interface