summaryrefslogtreecommitdiff
path: root/include/linux/key.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/key.h')
-rw-r--r--include/linux/key.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/key.h b/include/linux/key.h
index ad02d9cfe170..c45c962d1cc5 100644
--- a/include/linux/key.h
+++ b/include/linux/key.h
@@ -264,7 +264,10 @@ 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[];