ppp: make channel_ops const
authorstephen hemminger <shemminger@vyatta.com>
Wed, 4 Aug 2010 07:34:36 +0000 (07:34 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Aug 2010 04:53:17 +0000 (21:53 -0700)
The PPP channel ops structure should be const.
Cleanup the declarations to use standard C99 format.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/char/pcmcia/ipwireless/network.c
drivers/net/ppp_async.c
drivers/net/ppp_synctty.c
drivers/net/pppoe.c
include/linux/ppp_channel.h
net/atm/pppoatm.c
net/irda/irnet/irnet_ppp.c
net/l2tp/l2tp_ppp.c

index 65920163f53d5206bb0e8f0f1eca8a2bde278a6c..9fe538347932939a7caadce5fec586bee8103312 100644 (file)
@@ -239,7 +239,7 @@ static int ipwireless_ppp_ioctl(struct ppp_channel *ppp_channel,
        return err;
 }
 
-static struct ppp_channel_ops ipwireless_ppp_channel_ops = {
+static const struct ppp_channel_ops ipwireless_ppp_channel_ops = {
        .start_xmit = ipwireless_ppp_start_xmit,
        .ioctl      = ipwireless_ppp_ioctl
 };
index 6c2e8fa0ca31cd2865ad9f80d2f0fdc99103498b..af50a530daee25bf3debf8493690861c2ea2fcc2 100644 (file)
@@ -108,9 +108,9 @@ static void ppp_async_process(unsigned long arg);
 static void async_lcp_peek(struct asyncppp *ap, unsigned char *data,
                           int len, int inbound);
 
-static struct ppp_channel_ops async_ops = {
-       ppp_async_send,
-       ppp_async_ioctl
+static const struct ppp_channel_ops async_ops = {
+       .start_xmit = ppp_async_send,
+       .ioctl      = ppp_async_ioctl,
 };
 
 /*
index 52938da1e5420554db460c5c88680a4a349c0f24..4c95ec3fb8d4227d47be1bac36a09781c3fdf3d5 100644 (file)
@@ -97,9 +97,9 @@ static void ppp_sync_flush_output(struct syncppp *ap);
 static void ppp_sync_input(struct syncppp *ap, const unsigned char *buf,
                           char *flags, int count);
 
-static struct ppp_channel_ops sync_ops = {
-       ppp_sync_send,
-       ppp_sync_ioctl
+static const struct ppp_channel_ops sync_ops = {
+       .start_xmit = ppp_sync_send,
+       .ioctl      = ppp_sync_ioctl,
 };
 
 /*
index 344ef330e12320b41e486aae99e08a0d8990d9db..c07de359dc074e7abd789826f25728ab065350b3 100644 (file)
@@ -92,7 +92,7 @@
 static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb);
 
 static const struct proto_ops pppoe_ops;
-static struct ppp_channel_ops pppoe_chan_ops;
+static const struct ppp_channel_ops pppoe_chan_ops;
 
 /* per-net private data for this module */
 static int pppoe_net_id __read_mostly;
@@ -963,7 +963,7 @@ static int pppoe_xmit(struct ppp_channel *chan, struct sk_buff *skb)
        return __pppoe_xmit(sk, skb);
 }
 
-static struct ppp_channel_ops pppoe_chan_ops = {
+static const struct ppp_channel_ops pppoe_chan_ops = {
        .start_xmit = pppoe_xmit,
 };
 
index bff98ec1bfed2aa86e791ef7c6192cf37d29d2c0..5d87f810a3b747d028c47dc9c70264c6eccd6cc0 100644 (file)
@@ -36,7 +36,7 @@ struct ppp_channel_ops {
 
 struct ppp_channel {
        void            *private;       /* channel private data */
-       struct ppp_channel_ops *ops;    /* operations for this channel */
+       const struct ppp_channel_ops *ops; /* operations for this channel */
        int             mtu;            /* max transmit packet size */
        int             hdrlen;         /* amount of headroom channel needs */
        void            *ppp;           /* opaque to channel */
index e49bb6d948a1b1ec1a195f9952a2f0063640c7ce..e9aced0ec56b328cce16bd6db0be6d9109170fac 100644 (file)
@@ -260,7 +260,7 @@ static int pppoatm_devppp_ioctl(struct ppp_channel *chan, unsigned int cmd,
        return -ENOTTY;
 }
 
-static /*const*/ struct ppp_channel_ops pppoatm_ops = {
+static const struct ppp_channel_ops pppoatm_ops = {
        .start_xmit = pppoatm_send,
        .ioctl = pppoatm_devppp_ioctl,
 };
index 800bc53b7f63d36fdeeadf81ccdde5870b99dc9c..dfe7b38dd4afc9e91bb9455ef5ff4bffeeae931a 100644 (file)
@@ -20,7 +20,7 @@
 /* Please put other headers in irnet.h - Thanks */
 
 /* Generic PPP callbacks (to call us) */
-static struct ppp_channel_ops irnet_ppp_ops = {
+static const struct ppp_channel_ops irnet_ppp_ops = {
        .start_xmit = ppp_irnet_send,
        .ioctl = ppp_irnet_ioctl
 };
index 90d82b3f28898e898a418450fe4be5fe65436b01..ff954b3e94b6b3d6daab8bf7a538c15101bad782 100644 (file)
@@ -135,7 +135,10 @@ struct pppol2tp_session {
 
 static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb);
 
-static struct ppp_channel_ops pppol2tp_chan_ops = { pppol2tp_xmit , NULL };
+static const struct ppp_channel_ops pppol2tp_chan_ops = {
+       .start_xmit =  pppol2tp_xmit,
+};
+
 static const struct proto_ops pppol2tp_ops;
 
 /* Helpers to obtain tunnel/session contexts from sockets.