All of lore.kernel.org
 help / color / mirror / Atom feed
From: Claudio Scordino <claudio@evidence.eu.com>
To: linux-usb@vger.kernel.org
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
	Greg KH <gregkh@linuxfoundation.org>
Subject: [PATCH RESEND] umc-bus.c: fix usage of device_trylock
Date: Tue, 09 Oct 2012 12:21:17 +0200	[thread overview]
Message-ID: <5073FA9D.8080501@evidence.eu.com> (raw)

Hi all.

I've not received any feedback about this patch, so I'm resending just
to check if someone is going to take care of it.

The patch fixes the usage of device_trylock inside the driver umc-bus.c:
device_trylock has the same semantics of mutex_trylock, so it returns 1
if the lock has been acquired successfully.

Best regards,

	Claudio


Subject: umc-bus.c: fix usage of device_trylock
From: Claudio Scordino <claudio@evidence.eu.com>

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>
---
  drivers/uwb/umc-bus.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/uwb/umc-bus.c b/drivers/uwb/umc-bus.c
index 82a84d5..5c5b3fc 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)
-- 
1.7.1



             reply	other threads:[~2012-10-09 10:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-09 10:21 Claudio Scordino [this message]
2012-10-09 13:58 ` [PATCH RESEND] umc-bus.c: fix usage of device_trylock Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5073FA9D.8080501@evidence.eu.com \
    --to=claudio@evidence.eu.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.