lkml.org 
[lkml]   [2007]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 03/12] firewire : Use mutex instead of semaphore in driver core
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;

\
 
 \ /
  Last update: 2007-12-29 02:05    [W:4.037 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site