From c585dc5d73e4e2b18278f07482d6a24c29291bfa Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Mon, 8 Aug 2011 06:38:25 +0000 Subject: 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 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10096 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/voicebus/voicebus_net.c | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'drivers/dahdi/voicebus/voicebus_net.c') diff --git a/drivers/dahdi/voicebus/voicebus_net.c b/drivers/dahdi/voicebus/voicebus_net.c index 7d4af7f..41fca2f 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 * @@ -209,23 +203,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; -- cgit v1.2.3