mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
[XFRM]: constify 'struct xfrm_type'
Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
2216b48376
commit
533cb5b0a6
11 changed files with 22 additions and 22 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue