[PATCH] sem2mutex: misc static one-file mutexes

Semaphore to mutex conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Ingo Molnar <[email protected]>
Cc: Dave Jones <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Ralf Baechle <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Neil Brown <[email protected]>
Acked-by: Alasdair G Kergon <[email protected]>
Cc: Greg KH <[email protected]>
Cc: Dominik Brodowski <[email protected]>
Cc: Adam Belay <[email protected]>
Cc: Martin Schwidefsky <[email protected]>
Cc: "David S. Miller" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Ingo Molnar 2006-03-26 01:37:14 -08:00 • committed by Linus Torvalds
commit 14cc3e2b63
20 changed files with 172 additions and 157 deletions

View file

@ -35,6 +35,7 @@
#include <linux/delay.h>
#include <linux/sysdev.h>
#include <linux/poll.h>
#include <linux/mutex.h>
#include <asm/byteorder.h>
#include <asm/io.h>
@ -92,7 +93,7 @@ struct smu_device {
* for now, just hard code that
*/
static struct smu_device *smu;
static DECLARE_MUTEX(smu_part_access);
static DEFINE_MUTEX(smu_part_access);
static void smu_i2c_retry(unsigned long data);
@ -976,11 +977,11 @@ struct smu_sdbp_header *__smu_get_sdb_partition(int id, unsigned int *size,
if (interruptible) {
int rc;
rc = down_interruptible(&smu_part_access);
rc = mutex_lock_interruptible(&smu_part_access);
if (rc)
return ERR_PTR(rc);
} else
down(&smu_part_access);
mutex_lock(&smu_part_access);
part = (struct smu_sdbp_header *)get_property(smu->of_node,
pname, size);
@ -990,7 +991,7 @@ struct smu_sdbp_header *__smu_get_sdb_partition(int id, unsigned int *size,
if (part != NULL && size)
*size = part->len << 2;
}
up(&smu_part_access);
mutex_unlock(&smu_part_access);
return part;
}