summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2012-01-18 11:04:29 +0100
committerJames Morris <jmorris@namei.org>2012-01-19 06:17:35 +0100
commit456a8167e94b66f406c27400a46a707b870452b0 (patch)
tree6c6eedf5ff8819dc4c6346db651be9e8758e0df7
parentkeys: fix user_defined key sparse messages (diff)
downloadlinux-456a8167e94b66f406c27400a46a707b870452b0.tar.xz
linux-456a8167e94b66f406c27400a46a707b870452b0.zip
KEYS: Permit key_serial() to be called with a const key pointer
Permit key_serial() to be called with a const key pointer. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: James Morris <jmorris@namei.org>
-rw-r--r--include/linux/key.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/key.h b/include/linux/key.h
index bfc014c57351..5253471cd2ea 100644
--- a/include/linux/key.h
+++ b/include/linux/key.h
@@ -271,7 +271,7 @@ extern int keyring_add_key(struct key *keyring,
extern struct key *key_lookup(key_serial_t id);
-static inline key_serial_t key_serial(struct key *key)
+static inline key_serial_t key_serial(const struct key *key)
{
return key ? key->serial : 0;
}