Staging: benet: fix build errors when CONFIG_NETPOLL is off
authorSathya Perla <sathyap@serverengines.com>
Thu, 13 Nov 2008 05:43:32 +0000 (11:13 +0530)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 6 Jan 2009 21:52:15 +0000 (13:52 -0800)
Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/benet/Kconfig
drivers/staging/benet/TODO
drivers/staging/benet/be_int.c

index ffb8ebdfd168fc84185e7b2e612e68a113716d4b..f6806074f9986d794c571ea52cb757f9753b1955 100644 (file)
@@ -1,6 +1,6 @@
 config BENET
        tristate "ServerEngines 10Gb NIC - BladeEngine"
-       depends on PCI && INET && NETPOLL
+       depends on PCI && INET
        select INET_LRO
        help
          This driver implements the NIC functionality for ServerEngines
index e8d5b6463f427b30f68c9d951e27ca42e579a0cd..6113737b229908651fbf85e35e0f7a826324863c 100644 (file)
@@ -2,7 +2,6 @@ TODO:
        - fix minor checkpatch.pl issues
        - remove wrappers around common iowrite functions
        - full netdev audit of common problems/issues
-       - fix build errors when CONFIG_NETPOLL is not enabled
 
 Please send all patches and questions to Subbu Seetharaman
 <subbus@serverengines.com> and Greg Kroah-Hartman <greg@kroah.com>
index 20e55538bc6512ba206dacb4252703c731b16112..d67a2886d694fc51bfb8076a1b0130ea1e40e5db 100644 (file)
@@ -717,12 +717,10 @@ irqreturn_t be_int(int irq, void *dev)
  */
 int be_poll(struct napi_struct *napi, int budget)
 {
-       struct net_device *netdev = napi->dev;
-       struct be_net_object *pnob = netdev_priv(netdev);
-       struct be_adapter *adapter = pnob->adapter;
+       struct be_net_object *pnob = container_of(napi, struct be_net_object, napi);
        u32 work_done;
 
-       adapter->be_stat.bes_polls++;
+       pnob->adapter->be_stat.bes_polls++;
        work_done = process_rx_completions(pnob, budget);
        BUG_ON(work_done > budget);