Commit 8dd62822 authored by John W. Linville's avatar John W. Linville

prism54: correct thinko in "prism54: Convert stats_sem in a mutex"

mutex_trylock has different return code semantics than down_trylock...
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent cee24a3e
...@@ -218,7 +218,7 @@ prism54_get_wireless_stats(struct net_device *ndev) ...@@ -218,7 +218,7 @@ prism54_get_wireless_stats(struct net_device *ndev)
islpci_private *priv = netdev_priv(ndev); islpci_private *priv = netdev_priv(ndev);
/* If the stats are being updated return old data */ /* If the stats are being updated return old data */
if (mutex_trylock(&priv->stats_lock) == 0) { if (mutex_trylock(&priv->stats_lock)) {
memcpy(&priv->iwstatistics, &priv->local_iwstatistics, memcpy(&priv->iwstatistics, &priv->local_iwstatistics,
sizeof (struct iw_statistics)); sizeof (struct iw_statistics));
/* They won't be marked updated for the next time */ /* They won't be marked updated for the next time */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment