summaryrefslogtreecommitdiff
path: root/drivers/uwb
diff options
context:
space:
mode:
authorClaudio Scordino <claudio@evidence.eu.com>2012-10-09 12:21:17 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-25 11:39:31 -0700
commitb717727ef25d4b73f73e3666341c07a034f908a6 (patch)
tree462b6e20c3c6a883f91b3a9ec87956e760933b17 /drivers/uwb
parent6f602912c9d0c84c2edbd446dd9f72660b701605 (diff)
downloadlinux-3.10-b717727ef25d4b73f73e3666341c07a034f908a6.tar.gz
linux-3.10-b717727ef25d4b73f73e3666341c07a034f908a6.tar.bz2
linux-3.10-b717727ef25d4b73f73e3666341c07a034f908a6.zip
umc-bus.c: fix usage of device_trylock
Fix usage of device_trylock. It has the same semantics of mutex_trylock, so it returns 1 if the lock has been acquired successfully. Signed-off-by: Claudio Scordino <claudio@evidence.eu.com> Signed-off-by: Bruno Morelli <bruno@evidence.eu.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/uwb')
-rw-r--r--drivers/uwb/umc-bus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/uwb/umc-bus.c b/drivers/uwb/umc-bus.c
index 82a84d53120..5c5b3fc9088 100644
--- a/drivers/uwb/umc-bus.c
+++ b/drivers/uwb/umc-bus.c
@@ -63,7 +63,7 @@ int umc_controller_reset(struct umc_dev *umc)
struct device *parent = umc->dev.parent;
int ret = 0;
- if (device_trylock(parent))
+ if (!device_trylock(parent))
return -EAGAIN;
ret = device_for_each_child(parent, parent, umc_bus_pre_reset_helper);
if (ret >= 0)