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>
Esse commit está contido em:

commit de
David S. Miller

pai
026359bc6e
commit
d97a077a15
@@ -134,15 +134,15 @@ static netdev_tx_t x25_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
|
||||
static int x25_open(struct net_device *dev)
|
||||
{
|
||||
struct lapb_register_struct cb;
|
||||
int result;
|
||||
|
||||
cb.connect_confirmation = x25_connected;
|
||||
cb.connect_indication = x25_connected;
|
||||
cb.disconnect_confirmation = x25_disconnected;
|
||||
cb.disconnect_indication = x25_disconnected;
|
||||
cb.data_indication = x25_data_indication;
|
||||
cb.data_transmit = x25_data_transmit;
|
||||
static const struct lapb_register_struct cb = {
|
||||
.connect_confirmation = x25_connected,
|
||||
.connect_indication = x25_connected,
|
||||
.disconnect_confirmation = x25_disconnected,
|
||||
.disconnect_indication = x25_disconnected,
|
||||
.data_indication = x25_data_indication,
|
||||
.data_transmit = x25_data_transmit,
|
||||
};
|
||||
|
||||
result = lapb_register(dev, &cb);
|
||||
if (result != LAPB_OK)
|
||||
|
@@ -259,14 +259,13 @@ static int lapbeth_set_mac_address(struct net_device *dev, void *addr)
|
||||
}
|
||||
|
||||
|
||||
static struct lapb_register_struct lapbeth_callbacks = {
|
||||
static const struct lapb_register_struct lapbeth_callbacks = {
|
||||
.connect_confirmation = lapbeth_connected,
|
||||
.connect_indication = lapbeth_connected,
|
||||
.disconnect_confirmation = lapbeth_disconnected,
|
||||
.disconnect_indication = lapbeth_disconnected,
|
||||
.data_indication = lapbeth_data_indication,
|
||||
.data_transmit = lapbeth_data_transmit,
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
|
@@ -434,14 +434,13 @@ static void x25_asy_disconnected(struct net_device *dev, int reason)
|
||||
netif_rx(skb);
|
||||
}
|
||||
|
||||
static struct lapb_register_struct x25_asy_callbacks = {
|
||||
static const struct lapb_register_struct x25_asy_callbacks = {
|
||||
.connect_confirmation = x25_asy_connected,
|
||||
.connect_indication = x25_asy_connected,
|
||||
.disconnect_confirmation = x25_asy_disconnected,
|
||||
.disconnect_indication = x25_asy_disconnected,
|
||||
.data_indication = x25_asy_data_indication,
|
||||
.data_transmit = x25_asy_data_transmit,
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
Referência em uma nova issue
Block a user