linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] compat: fix build error in init_dummy_netdev
@ 2010-09-25 11:22 Hauke Mehrtens
  2010-09-25 21:55 ` Luis R. Rodriguez
  2010-09-26  0:43 ` Philip Prindeville
  0 siblings, 2 replies; 3+ messages in thread
From: Hauke Mehrtens @ 2010-09-25 11:22 UTC (permalink / raw)
  To: lrodriguez; +Cc: linux-wireless, mcgrof, Hauke Mehrtens, philipp_subx

In kernel <= 2.6.28 the member napi_list in struct net_device is only
availabe if CONFIG_NETPOLL is set. We should initialize it only if it
is available.

This should fix the problem reported by Philip.

This should also go into stable.

CC: philipp_subx@redfish-solutions.com
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 compat/compat-2.6.29.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/compat/compat-2.6.29.c b/compat/compat-2.6.29.c
index bc4288f..cded3cc 100644
--- a/compat/compat-2.6.29.c
+++ b/compat/compat-2.6.29.c
@@ -153,8 +153,10 @@ int init_dummy_netdev(struct net_device *dev)
 	/* initialize the ref count */
 	atomic_set(&dev->refcnt, 1);
 
+#ifdef CONFIG_NETPOLL
 	/* NAPI wants this */
 	INIT_LIST_HEAD(&dev->napi_list);
+#endif
 
 	/* a dummy interface is started by default */
 	set_bit(__LINK_STATE_PRESENT, &dev->state);
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-09-26  1:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-25 11:22 [PATCH] compat: fix build error in init_dummy_netdev Hauke Mehrtens
2010-09-25 21:55 ` Luis R. Rodriguez
2010-09-26  0:43 ` Philip Prindeville

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).