diff options
author | Alexander Aring <alex.aring@gmail.com> | 2014-10-28 13:21:22 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-10-28 18:19:07 -0400 |
commit | e1d299f61a1660cbbabccfa0d07421861b9b9711 (patch) | |
tree | 28435c6467f30291de83917c64ed85765ab4e6f6 | |
parent | 59cb300f2b2ce1fc46696deb9a7bd066cd53a65a (diff) |
mac802154: remove might_sleep from driver layer
This patch removes all might_sleep calls from driver layer. This
handling is already done by mac802154 layer.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r-- | drivers/net/ieee802154/at86rf230.c | 3 | ||||
-rw-r--r-- | drivers/net/ieee802154/cc2520.c | 1 | ||||
-rw-r--r-- | drivers/net/ieee802154/fakelb.c | 4 |
3 files changed, 0 insertions, 8 deletions
diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c index 5068c1bd0046..b83ad0b38688 100644 --- a/drivers/net/ieee802154/at86rf230.c +++ b/drivers/net/ieee802154/at86rf230.c | |||
@@ -993,7 +993,6 @@ at86rf230_xmit(struct ieee802154_hw *hw, struct sk_buff *skb) | |||
993 | static int | 993 | static int |
994 | at86rf230_ed(struct ieee802154_hw *hw, u8 *level) | 994 | at86rf230_ed(struct ieee802154_hw *hw, u8 *level) |
995 | { | 995 | { |
996 | might_sleep(); | ||
997 | BUG_ON(!level); | 996 | BUG_ON(!level); |
998 | *level = 0xbe; | 997 | *level = 0xbe; |
999 | return 0; | 998 | return 0; |
@@ -1048,8 +1047,6 @@ at86rf230_channel(struct ieee802154_hw *hw, u8 page, u8 channel) | |||
1048 | struct at86rf230_local *lp = hw->priv; | 1047 | struct at86rf230_local *lp = hw->priv; |
1049 | int rc; | 1048 | int rc; |
1050 | 1049 | ||
1051 | might_sleep(); | ||
1052 | |||
1053 | if (page < 0 || page > 31 || | 1050 | if (page < 0 || page > 31 || |
1054 | !(lp->hw->phy->channels_supported[page] & BIT(channel))) { | 1051 | !(lp->hw->phy->channels_supported[page] & BIT(channel))) { |
1055 | WARN_ON(1); | 1052 | WARN_ON(1); |
diff --git a/drivers/net/ieee802154/cc2520.c b/drivers/net/ieee802154/cc2520.c index 78ea2cadeb78..c56d10c7ccfa 100644 --- a/drivers/net/ieee802154/cc2520.c +++ b/drivers/net/ieee802154/cc2520.c | |||
@@ -574,7 +574,6 @@ cc2520_set_channel(struct ieee802154_hw *hw, u8 page, u8 channel) | |||
574 | struct cc2520_private *priv = hw->priv; | 574 | struct cc2520_private *priv = hw->priv; |
575 | int ret; | 575 | int ret; |
576 | 576 | ||
577 | might_sleep(); | ||
578 | dev_dbg(&priv->spi->dev, "trying to set channel\n"); | 577 | dev_dbg(&priv->spi->dev, "trying to set channel\n"); |
579 | 578 | ||
580 | BUG_ON(page != 0); | 579 | BUG_ON(page != 0); |
diff --git a/drivers/net/ieee802154/fakelb.c b/drivers/net/ieee802154/fakelb.c index 4092e704c4aa..6e62286cef78 100644 --- a/drivers/net/ieee802154/fakelb.c +++ b/drivers/net/ieee802154/fakelb.c | |||
@@ -47,7 +47,6 @@ struct fakelb_priv { | |||
47 | static int | 47 | static int |
48 | fakelb_hw_ed(struct ieee802154_hw *hw, u8 *level) | 48 | fakelb_hw_ed(struct ieee802154_hw *hw, u8 *level) |
49 | { | 49 | { |
50 | might_sleep(); | ||
51 | BUG_ON(!level); | 50 | BUG_ON(!level); |
52 | *level = 0xbe; | 51 | *level = 0xbe; |
53 | 52 | ||
@@ -59,7 +58,6 @@ fakelb_hw_channel(struct ieee802154_hw *hw, u8 page, u8 channel) | |||
59 | { | 58 | { |
60 | pr_debug("set channel to %d\n", channel); | 59 | pr_debug("set channel to %d\n", channel); |
61 | 60 | ||
62 | might_sleep(); | ||
63 | hw->phy->current_page = page; | 61 | hw->phy->current_page = page; |
64 | hw->phy->current_channel = channel; | 62 | hw->phy->current_channel = channel; |
65 | 63 | ||
@@ -85,8 +83,6 @@ fakelb_hw_xmit(struct ieee802154_hw *hw, struct sk_buff *skb) | |||
85 | struct fakelb_dev_priv *priv = hw->priv; | 83 | struct fakelb_dev_priv *priv = hw->priv; |
86 | struct fakelb_priv *fake = priv->fake; | 84 | struct fakelb_priv *fake = priv->fake; |
87 | 85 | ||
88 | might_sleep(); | ||
89 | |||
90 | read_lock_bh(&fake->lock); | 86 | read_lock_bh(&fake->lock); |
91 | if (priv->list.next == priv->list.prev) { | 87 | if (priv->list.next == priv->list.prev) { |
92 | /* we are the only one device */ | 88 | /* we are the only one device */ |