提交 b717727e 编写于 作者: C Claudio Scordino 提交者: Greg Kroah-Hartman

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: NClaudio Scordino <claudio@evidence.eu.com>
Signed-off-by: NBruno Morelli <bruno@evidence.eu.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 6f602912
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册