summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2011-08-11 19:54:44 +0000
committerShaun Ruffell <sruffell@digium.com>2011-08-11 19:54:44 +0000
commit017cc4809b9e032c80cc69426528147cff22f13a (patch)
tree1346f7b755f38047fa56c04fea95220affae9c2e
parent2bc0ae0d01ac2d028f0086ee9a1ed780c1f39dc5 (diff)
wctc4xxp, wcte12xp, wctdm24xxp: Remove check for HAVE_NETDEV_PRIV
DAHDI currently supports kernels >= 2.6.9. netdev_priv() has been in the mainline kernel since versions 2.6.6 so it's available in all the supported kernels. This change is needed to compile against the 3.1 kernel. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10096 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@10112 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--drivers/dahdi/voicebus/voicebus_net.c15
-rw-r--r--drivers/dahdi/wctc4xxp/base.c15
2 files changed, 0 insertions, 30 deletions
diff --git a/drivers/dahdi/voicebus/voicebus_net.c b/drivers/dahdi/voicebus/voicebus_net.c
index 4a82333..f0eabea 100644
--- a/drivers/dahdi/voicebus/voicebus_net.c
+++ b/drivers/dahdi/voicebus/voicebus_net.c
@@ -35,22 +35,16 @@
#ifdef VOICEBUS_NET_DEBUG
-#ifdef HAVE_NETDEV_PRIV
struct voicebus_netdev_priv {
struct voicebus *vb;
};
-#endif
static inline struct voicebus *
voicebus_from_netdev(struct net_device *netdev)
{
-#ifdef HAVE_NETDEV_PRIV
struct voicebus_netdev_priv *priv;
priv = netdev_priv(netdev);
return priv->vb;
-#else
- return netdev->priv;
-#endif
}
static void *
@@ -206,23 +200,14 @@ int vb_net_register(struct voicebus *vb, const char *board_name)
{
int res;
struct net_device *netdev;
-# ifdef HAVE_NETDEV_PRIV
struct voicebus_netdev_priv *priv;
-# endif
const char our_mac[] = { 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff};
-# ifdef HAVE_NETDEV_PRIV
netdev = alloc_netdev(sizeof(*priv), board_name, ether_setup);
if (!netdev)
return -ENOMEM;
priv = netdev_priv(netdev);
priv->vb = vb;
-# else
- netdev = alloc_netdev(0, vb->board_name, ether_setup);
- if (!netdev)
- return -ENOMEM;
- netdev->priv = vb;
-# endif
memcpy(netdev->dev_addr, our_mac, sizeof(our_mac));
# ifdef HAVE_NET_DEVICE_OPS
netdev->netdev_ops = &vb_netdev_ops;
diff --git a/drivers/dahdi/wctc4xxp/base.c b/drivers/dahdi/wctc4xxp/base.c
index 3ab4ca6..1a39a49 100644
--- a/drivers/dahdi/wctc4xxp/base.c
+++ b/drivers/dahdi/wctc4xxp/base.c
@@ -399,22 +399,16 @@ struct wcdte {
#endif
};
-#ifdef HAVE_NETDEV_PRIV
struct wcdte_netdev_priv {
struct wcdte *wc;
};
-#endif
static inline struct wcdte *
wcdte_from_netdev(struct net_device *netdev)
{
-#ifdef HAVE_NETDEV_PRIV
struct wcdte_netdev_priv *priv;
priv = netdev_priv(netdev);
return priv->wc;
-#else
- return netdev->priv;
-#endif
}
@@ -691,23 +685,14 @@ wctc4xxp_net_register(struct wcdte *wc)
{
int res;
struct net_device *netdev;
-# ifdef HAVE_NETDEV_PRIV
struct wcdte_netdev_priv *priv;
-# endif
const char our_mac[] = { 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff};
-# ifdef HAVE_NETDEV_PRIV
netdev = alloc_netdev(sizeof(*priv), wc->board_name, ether_setup);
if (!netdev)
return -ENOMEM;
priv = netdev_priv(netdev);
priv->wc = wc;
-# else
- netdev = alloc_netdev(0, wc->board_name, ether_setup);
- if (!netdev)
- return -ENOMEM;
- netdev->priv = wc;
-# endif
memcpy(netdev->dev_addr, our_mac, sizeof(our_mac));
# ifdef HAVE_NET_DEVICE_OPS