summaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_state.c
diff options
context:
space:
mode:
authorEric Dumazet <dada1@cosmosbay.com>2008-01-30 19:11:50 -0800
committerDavid S. Miller <davem@davemloft.net>2008-01-31 19:27:20 -0800
commit533cb5b0a63f28ecab5503cfceb77e641fa7f7c4 (patch)
tree62e7d7c65776c5fb30a8ff10fb3049e63257331c /net/xfrm/xfrm_state.c
parent2216b48376c40cf6984398d478a01b55e76c5434 (diff)
downloadkernel-crypto-533cb5b0a63f28ecab5503cfceb77e641fa7f7c4.tar.gz
kernel-crypto-533cb5b0a63f28ecab5503cfceb77e641fa7f7c4.tar.xz
kernel-crypto-533cb5b0a63f28ecab5503cfceb77e641fa7f7c4.zip
[XFRM]: constify 'struct xfrm_type'
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm/xfrm_state.c')
-rw-r--r--net/xfrm/xfrm_state.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 3003503d0c9..4463eeb8d1d 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -216,10 +216,10 @@ static void xfrm_state_unlock_afinfo(struct xfrm_state_afinfo *afinfo)
write_unlock_bh(&xfrm_state_afinfo_lock);
}
-int xfrm_register_type(struct xfrm_type *type, unsigned short family)
+int xfrm_register_type(const struct xfrm_type *type, unsigned short family)
{
struct xfrm_state_afinfo *afinfo = xfrm_state_lock_afinfo(family);
- struct xfrm_type **typemap;
+ const struct xfrm_type **typemap;
int err = 0;
if (unlikely(afinfo == NULL))
@@ -235,10 +235,10 @@ int xfrm_register_type(struct xfrm_type *type, unsigned short family)
}
EXPORT_SYMBOL(xfrm_register_type);
-int xfrm_unregister_type(struct xfrm_type *type, unsigned short family)
+int xfrm_unregister_type(const struct xfrm_type *type, unsigned short family)
{
struct xfrm_state_afinfo *afinfo = xfrm_state_lock_afinfo(family);
- struct xfrm_type **typemap;
+ const struct xfrm_type **typemap;
int err = 0;
if (unlikely(afinfo == NULL))
@@ -254,11 +254,11 @@ int xfrm_unregister_type(struct xfrm_type *type, unsigned short family)
}
EXPORT_SYMBOL(xfrm_unregister_type);
-static struct xfrm_type *xfrm_get_type(u8 proto, unsigned short family)
+static const struct xfrm_type *xfrm_get_type(u8 proto, unsigned short family)
{
struct xfrm_state_afinfo *afinfo;
- struct xfrm_type **typemap;
- struct xfrm_type *type;
+ const struct xfrm_type **typemap;
+ const struct xfrm_type *type;
int modload_attempted = 0;
retry:
@@ -281,7 +281,7 @@ retry:
return type;
}
-static void xfrm_put_type(struct xfrm_type *type)
+static void xfrm_put_type(const struct xfrm_type *type)
{
module_put(type->owner);
}