aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2011-09-16 07:04:29 -0400
committerDavid S. Miller <davem@davemloft.net>2011-09-16 19:20:20 -0400
commitd97a077a15ae21e161e74def7762caa99200e4cf (patch)
tree2c017dad747ab7d1ddb5fc090d1d3b1038f0c33f /drivers
parent026359bc6eddfdc2d2e684bf0b51691649b90f33 (diff)
wan: make LAPB callbacks const
This is compile tested only. Suggested by dumpster diving in PAX. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wan/hdlc_x25.c16
-rw-r--r--drivers/net/wan/lapbether.c3
-rw-r--r--drivers/net/wan/x25_asy.c3
3 files changed, 10 insertions, 12 deletions
diff --git a/drivers/net/wan/hdlc_x25.c b/drivers/net/wan/hdlc_x25.c
index 56aeb011cb3d..a49aec5efd20 100644
--- a/drivers/net/wan/hdlc_x25.c
+++ b/drivers/net/wan/hdlc_x25.c
@@ -134,15 +134,15 @@ static netdev_tx_t x25_xmit(struct sk_buff *skb, struct net_device *dev)
134 134
135static int x25_open(struct net_device *dev) 135static int x25_open(struct net_device *dev)
136{ 136{
137 struct lapb_register_struct cb;
138 int result; 137 int result;
139 138 static const struct lapb_register_struct cb = {
140 cb.connect_confirmation = x25_connected; 139 .connect_confirmation = x25_connected,
141 cb.connect_indication = x25_connected; 140 .connect_indication = x25_connected,
142 cb.disconnect_confirmation = x25_disconnected; 141 .disconnect_confirmation = x25_disconnected,
143 cb.disconnect_indication = x25_disconnected; 142 .disconnect_indication = x25_disconnected,
144 cb.data_indication = x25_data_indication; 143 .data_indication = x25_data_indication,
145 cb.data_transmit = x25_data_transmit; 144 .data_transmit = x25_data_transmit,
145 };
146 146
147 result = lapb_register(dev, &cb); 147 result = lapb_register(dev, &cb);
148 if (result != LAPB_OK) 148 if (result != LAPB_OK)
diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c
index a817081737a0..7beeb9b88a3b 100644
--- a/drivers/net/wan/lapbether.c
+++ b/drivers/net/wan/lapbether.c
@@ -259,14 +259,13 @@ static int lapbeth_set_mac_address(struct net_device *dev, void *addr)
259} 259}
260 260
261 261
262static struct lapb_register_struct lapbeth_callbacks = { 262static const struct lapb_register_struct lapbeth_callbacks = {
263 .connect_confirmation = lapbeth_connected, 263 .connect_confirmation = lapbeth_connected,
264 .connect_indication = lapbeth_connected, 264 .connect_indication = lapbeth_connected,
265 .disconnect_confirmation = lapbeth_disconnected, 265 .disconnect_confirmation = lapbeth_disconnected,
266 .disconnect_indication = lapbeth_disconnected, 266 .disconnect_indication = lapbeth_disconnected,
267 .data_indication = lapbeth_data_indication, 267 .data_indication = lapbeth_data_indication,
268 .data_transmit = lapbeth_data_transmit, 268 .data_transmit = lapbeth_data_transmit,
269
270}; 269};
271 270
272/* 271/*
diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c
index 46ceb3ae9073..8a10bb730d5a 100644
--- a/drivers/net/wan/x25_asy.c
+++ b/drivers/net/wan/x25_asy.c
@@ -434,14 +434,13 @@ static void x25_asy_disconnected(struct net_device *dev, int reason)
434 netif_rx(skb); 434 netif_rx(skb);
435} 435}
436 436
437static struct lapb_register_struct x25_asy_callbacks = { 437static const struct lapb_register_struct x25_asy_callbacks = {
438 .connect_confirmation = x25_asy_connected, 438 .connect_confirmation = x25_asy_connected,
439 .connect_indication = x25_asy_connected, 439 .connect_indication = x25_asy_connected,
440 .disconnect_confirmation = x25_asy_disconnected, 440 .disconnect_confirmation = x25_asy_disconnected,
441 .disconnect_indication = x25_asy_disconnected, 441 .disconnect_indication = x25_asy_disconnected,
442 .data_indication = x25_asy_data_indication, 442 .data_indication = x25_asy_data_indication,
443 .data_transmit = x25_asy_data_transmit, 443 .data_transmit = x25_asy_data_transmit,
444
445}; 444};
446 445
447 446