diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-09-21 02:43:54 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-21 21:04:47 -0400 |
commit | 756e64a0b106f1a2ca96889c39ea0d48131105c0 (patch) | |
tree | aab1079dc10deebcdc0dfeaf6e009f9371131668 | |
parent | a9478e386165477504916094ae5efb073a44fd9f (diff) |
net: constify some ppp/pptp structs
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/pppoe.c | 2 | ||||
-rw-r--r-- | drivers/net/pppox.c | 4 | ||||
-rw-r--r-- | drivers/net/pptp.c | 8 | ||||
-rw-r--r-- | include/linux/if_pppox.h | 2 | ||||
-rw-r--r-- | net/l2tp/l2tp_ppp.c | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c index c07de359dc07..d72fb0519a2a 100644 --- a/drivers/net/pppoe.c +++ b/drivers/net/pppoe.c | |||
@@ -1124,7 +1124,7 @@ static const struct proto_ops pppoe_ops = { | |||
1124 | .ioctl = pppox_ioctl, | 1124 | .ioctl = pppox_ioctl, |
1125 | }; | 1125 | }; |
1126 | 1126 | ||
1127 | static struct pppox_proto pppoe_proto = { | 1127 | static const struct pppox_proto pppoe_proto = { |
1128 | .create = pppoe_create, | 1128 | .create = pppoe_create, |
1129 | .ioctl = pppoe_ioctl, | 1129 | .ioctl = pppoe_ioctl, |
1130 | .owner = THIS_MODULE, | 1130 | .owner = THIS_MODULE, |
diff --git a/drivers/net/pppox.c b/drivers/net/pppox.c index d4191ef9cad1..8c0d170dabcd 100644 --- a/drivers/net/pppox.c +++ b/drivers/net/pppox.c | |||
@@ -36,9 +36,9 @@ | |||
36 | 36 | ||
37 | #include <asm/uaccess.h> | 37 | #include <asm/uaccess.h> |
38 | 38 | ||
39 | static struct pppox_proto *pppox_protos[PX_MAX_PROTO + 1]; | 39 | static const struct pppox_proto *pppox_protos[PX_MAX_PROTO + 1]; |
40 | 40 | ||
41 | int register_pppox_proto(int proto_num, struct pppox_proto *pp) | 41 | int register_pppox_proto(int proto_num, const struct pppox_proto *pp) |
42 | { | 42 | { |
43 | if (proto_num < 0 || proto_num > PX_MAX_PROTO) | 43 | if (proto_num < 0 || proto_num > PX_MAX_PROTO) |
44 | return -EINVAL; | 44 | return -EINVAL; |
diff --git a/drivers/net/pptp.c b/drivers/net/pptp.c index 761f0eced724..ccbc91326bfa 100644 --- a/drivers/net/pptp.c +++ b/drivers/net/pptp.c | |||
@@ -53,7 +53,7 @@ static struct pppox_sock **callid_sock; | |||
53 | static DEFINE_SPINLOCK(chan_lock); | 53 | static DEFINE_SPINLOCK(chan_lock); |
54 | 54 | ||
55 | static struct proto pptp_sk_proto __read_mostly; | 55 | static struct proto pptp_sk_proto __read_mostly; |
56 | static struct ppp_channel_ops pptp_chan_ops; | 56 | static const struct ppp_channel_ops pptp_chan_ops; |
57 | static const struct proto_ops pptp_ops; | 57 | static const struct proto_ops pptp_ops; |
58 | 58 | ||
59 | #define PPP_LCP_ECHOREQ 0x09 | 59 | #define PPP_LCP_ECHOREQ 0x09 |
@@ -628,7 +628,7 @@ static int pptp_ppp_ioctl(struct ppp_channel *chan, unsigned int cmd, | |||
628 | return err; | 628 | return err; |
629 | } | 629 | } |
630 | 630 | ||
631 | static struct ppp_channel_ops pptp_chan_ops = { | 631 | static const struct ppp_channel_ops pptp_chan_ops = { |
632 | .start_xmit = pptp_xmit, | 632 | .start_xmit = pptp_xmit, |
633 | .ioctl = pptp_ppp_ioctl, | 633 | .ioctl = pptp_ppp_ioctl, |
634 | }; | 634 | }; |
@@ -659,12 +659,12 @@ static const struct proto_ops pptp_ops = { | |||
659 | .ioctl = pppox_ioctl, | 659 | .ioctl = pppox_ioctl, |
660 | }; | 660 | }; |
661 | 661 | ||
662 | static struct pppox_proto pppox_pptp_proto = { | 662 | static const struct pppox_proto pppox_pptp_proto = { |
663 | .create = pptp_create, | 663 | .create = pptp_create, |
664 | .owner = THIS_MODULE, | 664 | .owner = THIS_MODULE, |
665 | }; | 665 | }; |
666 | 666 | ||
667 | static struct gre_protocol gre_pptp_protocol = { | 667 | static const struct gre_protocol gre_pptp_protocol = { |
668 | .handler = pptp_rcv, | 668 | .handler = pptp_rcv, |
669 | }; | 669 | }; |
670 | 670 | ||
diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h index 29bcd55851eb..397921b09ef9 100644 --- a/include/linux/if_pppox.h +++ b/include/linux/if_pppox.h | |||
@@ -204,7 +204,7 @@ struct pppox_proto { | |||
204 | struct module *owner; | 204 | struct module *owner; |
205 | }; | 205 | }; |
206 | 206 | ||
207 | extern int register_pppox_proto(int proto_num, struct pppox_proto *pp); | 207 | extern int register_pppox_proto(int proto_num, const struct pppox_proto *pp); |
208 | extern void unregister_pppox_proto(int proto_num); | 208 | extern void unregister_pppox_proto(int proto_num); |
209 | extern void pppox_unbind_sock(struct sock *sk);/* delete ppp-channel binding */ | 209 | extern void pppox_unbind_sock(struct sock *sk);/* delete ppp-channel binding */ |
210 | extern int pppox_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); | 210 | extern int pppox_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); |
diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c index ff954b3e94b6..39a21d0c61c4 100644 --- a/net/l2tp/l2tp_ppp.c +++ b/net/l2tp/l2tp_ppp.c | |||
@@ -1768,7 +1768,7 @@ static const struct proto_ops pppol2tp_ops = { | |||
1768 | .ioctl = pppox_ioctl, | 1768 | .ioctl = pppox_ioctl, |
1769 | }; | 1769 | }; |
1770 | 1770 | ||
1771 | static struct pppox_proto pppol2tp_proto = { | 1771 | static const struct pppox_proto pppol2tp_proto = { |
1772 | .create = pppol2tp_create, | 1772 | .create = pppol2tp_create, |
1773 | .ioctl = pppol2tp_ioctl | 1773 | .ioctl = pppol2tp_ioctl |
1774 | }; | 1774 | }; |