From: Laurent Pinchart Date: Fri, 11 Apr 2008 12:05:50 +0000 (+0200) Subject: fs_enet: Don't call NAPI functions when NAPI is not used. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9a3c243d7d87f401682247dbeff94067d814c192;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git fs_enet: Don't call NAPI functions when NAPI is not used. fs_enet_close() calls napi_disable() unconditionally. This patch skips the call when use_napi isn't set. Signed-off-by: Laurent Pinchart Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c index af869cf9ae7d..940e2041ba38 100644 --- a/drivers/net/fs_enet/fs_enet-main.c +++ b/drivers/net/fs_enet/fs_enet-main.c @@ -835,7 +835,8 @@ static int fs_enet_close(struct net_device *dev) netif_stop_queue(dev); netif_carrier_off(dev); - napi_disable(&fep->napi); + if (fep->fpi->use_napi) + napi_disable(&fep->napi); phy_stop(fep->phydev); spin_lock_irqsave(&fep->lock, flags);