* [PATCH 03/12] firewire : Use mutex instead of semaphore in driver core
@ 2007-12-29 1:06 Dave Young
2007-12-29 11:42 ` Stefan Richter
0 siblings, 1 reply; 2+ messages in thread
From: Dave Young @ 2007-12-29 1:06 UTC (permalink / raw)
To: krh, stefanr; +Cc: linux-kernel, linux1394-devel
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;
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH 03/12] firewire : Use mutex instead of semaphore in driver core
2007-12-29 1:06 [PATCH 03/12] firewire : Use mutex instead of semaphore in driver core Dave Young
@ 2007-12-29 11:42 ` Stefan Richter
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Richter @ 2007-12-29 11:42 UTC (permalink / raw)
To: Dave Young; +Cc: krh, linux-kernel, linux1394-devel
Dave Young wrote:
> --- 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;
ACK to this part of the series.
--
Stefan Richter
-=====-=-=== ==-- ===-=
http://arcgraph.de/sr/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-12-29 11:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-29 1:06 [PATCH 03/12] firewire : Use mutex instead of semaphore in driver core Dave Young
2007-12-29 11:42 ` Stefan Richter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox