From: David Howells Date: Wed, 18 Jan 2012 10:04:29 +0000 (+0000) Subject: KEYS: Permit key_serial() to be called with a const key pointer X-Git-Tag: v3.3-rc1~4^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=456a8167e94b66f406c27400a46a707b870452b0;p=platform%2Fkernel%2Flinux-stable.git 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 Signed-off-by: James Morris --- diff --git a/include/linux/key.h b/include/linux/key.h index bfc014c..5253471 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; }