- don't use compat.h in the mainline driver
- correct constness of function pointer declarations
This commit is contained in:
parent
eb003e8df3
commit
2f4a4fd5fe
|
|
@ -22,7 +22,6 @@
|
|||
#include <linux/etherdevice.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include "compat.h"
|
||||
#include "module.h"
|
||||
#include "netdev.h"
|
||||
#include "update.h"
|
||||
|
|
|
|||
|
|
@ -200,15 +200,15 @@ struct ccat_eth_priv {
|
|||
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);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
#include <linux/netdevice.h>
|
||||
#include <linux/spinlock.h>
|
||||
|
||||
#include "compat.h"
|
||||
#include "module.h"
|
||||
#include "netdev.h"
|
||||
|
||||
|
|
@ -50,10 +49,8 @@ static const u8 frameForwardEthernetFrames[] = {
|
|||
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 @@ static void ccat_eth_xmit_raw(struct net_device *dev, const char *data,
|
|||
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 @@ static void ecdev_kfree_skb_any(struct sk_buff *skb)
|
|||
/* 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 @@ inline static size_t ccat_eth_priv_read_link_state(const struct ccat_eth_priv
|
|||
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 @@ static struct rtnl_link_stats64 *ccat_eth_get_stats64(struct net_device *dev, st
|
|||
//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)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include "compat.h"
|
||||
#include "module.h"
|
||||
#include "update.h"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue