[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTimf_mVrRPEcj8qBbYw1iYHfWdeKUNS3Kk-dfhTT@mail.gmail.com>
Date: Tue, 2 Nov 2010 00:25:58 +0000
From: Daniel J Blueman <daniel.blueman@...il.com>
To: "David S. Miller" <davem@...emloft.net>
Cc: Francois Romieu <romieu@...zoreil.com>,
Linux Kernel <linux-kernel@...r.kernel.org>
Subject: [2.6.37-rc1, patch] gianfar: fix sleep in atomic...
Since device_set_wakeup_enable now sleeps, it should not be called
from a critical section. Since wol_en is not updated elsewhere, we can
omit the locking entirely.
Signed-off-by: Daniel J Blueman <daniel.blueman@...il.com>
diff --git a/drivers/net/gianfar_ethtool.c b/drivers/net/gianfar_ethtool.c
index 5c566eb..e641d7c 100644
--- a/drivers/net/gianfar_ethtool.c
+++ b/drivers/net/gianfar_ethtool.c
@@ -635,10 +635,8 @@ static int gfar_set_wol(struct net_device *dev,
struct ethtool_wolinfo *wol)
if (wol->wolopts & ~WAKE_MAGIC)
return -EINVAL;
- spin_lock_irqsave(&priv->bflock, flags);
priv->wol_en = wol->wolopts & WAKE_MAGIC ? 1 : 0;
device_set_wakeup_enable(&dev->dev, priv->wol_en);
- spin_unlock_irqrestore(&priv->bflock, flags);
return 0;
}
--
Daniel J Blueman
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists