From: Dave Young <hidave.darkstar@gmail.com>
To: krh@redhat.com, stefanr@s5r6.in-berlin.de
Cc: linux-kernel@vger.kernel.org, linux1394-devel@lists.sourceforge.net
Subject: [PATCH 03/12] firewire : Use mutex instead of semaphore in driver core
Date: Sat, 29 Dec 2007 09:06:02 +0800 [thread overview]
Message-ID: <20071229010602.GD2883@darkstar.te-china.tietoenator.com> (raw)
Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
---
drivers/firewire/fw-device.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff -upr linux/drivers/firewire/fw-device.c linux.new/drivers/firewire/fw-device.c
--- linux/drivers/firewire/fw-device.c 2007-12-28 10:02:38.000000000 +0800
+++ linux.new/drivers/firewire/fw-device.c 2007-12-28 10:05:00.000000000 +0800
@@ -26,7 +26,7 @@
#include <linux/delay.h>
#include <linux/idr.h>
#include <linux/rwsem.h>
-#include <asm/semaphore.h>
+#include <linux/mutex.h>
#include <linux/ctype.h>
#include "fw-transaction.h"
#include "fw-topology.h"
@@ -731,9 +731,9 @@ static int update_unit(struct device *de
struct fw_driver *driver = (struct fw_driver *)dev->driver;
if (is_fw_unit(dev) && driver != NULL && driver->update != NULL) {
- down(&dev->sem);
+ mutex_lock(&dev->mutex);
driver->update(unit);
- up(&dev->sem);
+ mutex_unlock(&dev->mutex);
}
return 0;
next reply other threads:[~2007-12-29 1:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-29 1:06 Dave Young [this message]
2007-12-29 11:42 ` Stefan Richter
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=20071229010602.GD2883@darkstar.te-china.tietoenator.com \
--to=hidave.darkstar@gmail.com \
--cc=krh@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
--cc=stefanr@s5r6.in-berlin.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®