# HG changeset patch # User Patrick Bruenn # Date 1401979201 -7200 # Node ID 144e11d93e995f3f3794b5b486fd75fac8533c0f # Parent 720172a7563f274784e9e12b2583e133a57c4e72 - don't use compat.h in the mainline driver - correct constness of function pointer declarations diff -r 720172a7563f -r 144e11d93e99 devices/ccat/module.c --- a/devices/ccat/module.c Thu Jun 05 16:30:22 2014 +0200 +++ b/devices/ccat/module.c Thu Jun 05 16:40:01 2014 +0200 @@ -22,7 +22,6 @@ #include #include #include -#include "compat.h" #include "module.h" #include "netdev.h" #include "update.h" diff -r 720172a7563f -r 144e11d93e99 devices/ccat/module.h --- a/devices/ccat/module.h Thu Jun 05 16:30:22 2014 +0200 +++ b/devices/ccat/module.h Thu Jun 05 16:40:01 2014 +0200 @@ -200,15 +200,15 @@ atomic64_t tx_bytes; atomic64_t tx_dropped; ec_device_t *ecdev; - void (*carrier_off) (struct net_device * const netdev); - bool (*carrier_ok) (struct net_device *const netdev); - void (*carrier_on) (struct net_device * const netdev); + void (*carrier_off) (struct net_device * netdev); + bool (*carrier_ok) (const struct net_device * netdev); + void (*carrier_on) (struct net_device * netdev); void (*kfree_skb_any) (struct sk_buff * skb); - void (*start_queue) (struct net_device * const netdev); - void (*stop_queue) (struct net_device * const netdev); - void (*tx_fifo_full) (struct ccat_eth_priv * const priv, - const struct ccat_eth_frame * const frame); - void (*unregister) (struct net_device * const netdev); + void (*start_queue) (struct net_device * netdev); + void (*stop_queue) (struct net_device * netdev); + void (*tx_fifo_full) (struct ccat_eth_priv * priv, + const struct ccat_eth_frame * frame); + void (*unregister) (struct net_device * netdev); }; /** diff -r 720172a7563f -r 144e11d93e99 devices/ccat/netdev.c --- a/devices/ccat/netdev.c Thu Jun 05 16:30:22 2014 +0200 +++ b/devices/ccat/netdev.c Thu Jun 05 16:40:01 2014 +0200 @@ -25,7 +25,6 @@ #include #include -#include "compat.h" #include "module.h" #include "netdev.h" @@ -50,10 +49,8 @@ static void ec_poll(struct net_device *dev); static enum hrtimer_restart poll_timer_callback(struct hrtimer *timer); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35) static struct rtnl_link_stats64 *ccat_eth_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *storage); -#endif static int ccat_eth_open(struct net_device *dev); static netdev_tx_t ccat_eth_start_xmit(struct sk_buff *skb, struct net_device *dev); @@ -62,9 +59,7 @@ size_t len); static const struct net_device_ops ccat_eth_netdev_ops = { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35) .ndo_get_stats64 = ccat_eth_get_stats64, -#endif .ndo_open = ccat_eth_open, .ndo_start_xmit = ccat_eth_start_xmit, .ndo_stop = ccat_eth_stop, @@ -75,7 +70,7 @@ /* never release a skb in EtherCAT mode */ } -static bool ecdev_carrier_ok(struct net_device *const netdev) +static bool ecdev_carrier_ok(const struct net_device *const netdev) { struct ccat_eth_priv *const priv = netdev_priv(netdev); return ecdev_get_link(priv->ecdev); @@ -242,7 +237,6 @@ return (1 << 24) == (ioread32(priv->reg.mii + 0x8 + 4) & (1 << 24)); } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35) static struct rtnl_link_stats64 *ccat_eth_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *storage) { @@ -281,7 +275,6 @@ //TODO __u64 tx_compressed; return storage; } -#endif struct ccat_eth_priv *ccat_eth_init(const struct ccat_device *const ccatdev, const void __iomem * const addr) diff -r 720172a7563f -r 144e11d93e99 devices/ccat/update.c --- a/devices/ccat/update.c Thu Jun 05 16:30:22 2014 +0200 +++ b/devices/ccat/update.c Thu Jun 05 16:40:01 2014 +0200 @@ -23,7 +23,6 @@ #include #include #include -#include "compat.h" #include "module.h" #include "update.h"