Skip to content

Commit

Permalink
prism54: correct thinko in "prism54: Convert stats_sem in a mutex"
Browse files Browse the repository at this point in the history
mutex_trylock has different return code semantics than down_trylock...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
John W. Linville committed Mar 27, 2008
1 parent cee24a3 commit 8dd6282
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/prism54/isl_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 8dd6282

Please sign in to comment.