From 6a30ed4ed0aa74aef894ac88945f41fb34e4019d Mon Sep 17 00:00:00 2001 From: "Luis R. Rodriguez" Date: Wed, 19 May 2010 15:31:51 -0700 Subject: [PATCH] Remove the stupid SET_NETDEVOP Signed-off-by: Luis R. Rodriguez --- compat/compat-2.6.29.c | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/compat/compat-2.6.29.c b/compat/compat-2.6.29.c index 8c725ee73151..f94aed863aef 100644 --- a/compat/compat-2.6.29.c +++ b/compat/compat-2.6.29.c @@ -24,31 +24,28 @@ void netdev_attach_ops(struct net_device *dev, const struct net_device_ops *ops) { -#define SET_NETDEVOP(_op) (_op ? _op : NULL) - dev->open = SET_NETDEVOP(ops->ndo_open); - dev->stop = SET_NETDEVOP(ops->ndo_stop); - dev->hard_start_xmit = SET_NETDEVOP(ops->ndo_start_xmit); - dev->change_rx_flags = SET_NETDEVOP(ops->ndo_change_rx_flags); - dev->set_multicast_list = SET_NETDEVOP(ops->ndo_set_multicast_list); - dev->validate_addr = SET_NETDEVOP(ops->ndo_validate_addr); - dev->do_ioctl = SET_NETDEVOP(ops->ndo_do_ioctl); - dev->set_config = SET_NETDEVOP(ops->ndo_set_config); - dev->change_mtu = SET_NETDEVOP(ops->ndo_change_mtu); - dev->set_mac_address = SET_NETDEVOP(ops->ndo_set_mac_address); - dev->tx_timeout = SET_NETDEVOP(ops->ndo_tx_timeout); - dev->get_stats = SET_NETDEVOP(ops->ndo_get_stats); - dev->vlan_rx_register = SET_NETDEVOP(ops->ndo_vlan_rx_register); - dev->vlan_rx_add_vid = SET_NETDEVOP(ops->ndo_vlan_rx_add_vid); - dev->vlan_rx_kill_vid = SET_NETDEVOP(ops->ndo_vlan_rx_kill_vid); + dev->open = ops->ndo_open; + dev->stop = ops->ndo_stop; + dev->hard_start_xmit = ops->ndo_start_xmit; + dev->change_rx_flags = ops->ndo_change_rx_flags; + dev->set_multicast_list = ops->ndo_set_multicast_list; + dev->validate_addr = ops->ndo_validate_addr; + dev->do_ioctl = ops->ndo_do_ioctl; + dev->set_config = ops->ndo_set_config; + dev->change_mtu = ops->ndo_change_mtu; + dev->set_mac_address = ops->ndo_set_mac_address; + dev->tx_timeout = ops->ndo_tx_timeout; + dev->get_stats = ops->ndo_get_stats; + dev->vlan_rx_register = ops->ndo_vlan_rx_register; + dev->vlan_rx_add_vid = ops->ndo_vlan_rx_add_vid; + dev->vlan_rx_kill_vid = ops->ndo_vlan_rx_kill_vid; #ifdef CONFIG_NET_POLL_CONTROLLER - dev->poll_controller = SET_NETDEVOP(ops->ndo_poll_controller); + dev->poll_controller = ops->ndo_poll_controller; #endif #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)) - dev->select_queue = SET_NETDEVOP(ops->ndo_select_queue); + dev->select_queue = ops->ndo_select_queue; #endif - -#undef SET_NETDEVOP } EXPORT_SYMBOL(netdev_attach_ops); -- 2.30.2