]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
prism54: correct thinko in "prism54: Convert stats_sem in a mutex"
authorJohn W. Linville <linville@tuxdriver.com>
Wed, 26 Mar 2008 19:21:33 +0000 (15:21 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 27 Mar 2008 20:03:22 +0000 (16:03 -0400)
mutex_trylock has different return code semantics than down_trylock...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/prism54/isl_ioctl.c

index 2d91a56d6a39c72c0d6a7ec20644a02d5e1d6045..2e25e190f334fc57e4567c32e6c5409913bf3a8b 100644 (file)
@@ -218,7 +218,7 @@ prism54_get_wireless_stats(struct net_device *ndev)
        islpci_private *priv = netdev_priv(ndev);
 
        /* 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,
                       sizeof (struct iw_statistics));
                /* They won't be marked updated for the next time */