projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] IB/ipath: fix shared receive queues for RC
[powerpc.git]
/
drivers
/
macintosh
/
smu.c
diff --git
a/drivers/macintosh/smu.c
b/drivers/macintosh/smu.c
index
4eb05d7
..
0301305
100644
(file)
--- a/
drivers/macintosh/smu.c
+++ b/
drivers/macintosh/smu.c
@@
-19,7
+19,6
@@
* the userland interface
*/
* the userland interface
*/
-#include <linux/config.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/device.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/device.h>
@@
-35,6
+34,7
@@
#include <linux/delay.h>
#include <linux/sysdev.h>
#include <linux/poll.h>
#include <linux/delay.h>
#include <linux/sysdev.h>
#include <linux/poll.h>
+#include <linux/mutex.h>
#include <asm/byteorder.h>
#include <asm/io.h>
#include <asm/byteorder.h>
#include <asm/io.h>
@@
-92,7
+92,7
@@
struct smu_device {
* for now, just hard code that
*/
static struct smu_device *smu;
* for now, just hard code that
*/
static struct smu_device *smu;
-static DE
CLAR
E_MUTEX(smu_part_access);
+static DE
FIN
E_MUTEX(smu_part_access);
static void smu_i2c_retry(unsigned long data);
static void smu_i2c_retry(unsigned long data);
@@
-976,11
+976,11
@@
struct smu_sdbp_header *__smu_get_sdb_partition(int id, unsigned int *size,
if (interruptible) {
int rc;
if (interruptible) {
int rc;
- rc =
down
_interruptible(&smu_part_access);
+ rc =
mutex_lock
_interruptible(&smu_part_access);
if (rc)
return ERR_PTR(rc);
} else
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);
part = (struct smu_sdbp_header *)get_property(smu->of_node,
pname, size);
@@
-990,7
+990,7
@@
struct smu_sdbp_header *__smu_get_sdb_partition(int id, unsigned int *size,
if (part != NULL && size)
*size = part->len << 2;
}
if (part != NULL && size)
*size = part->len << 2;
}
-
up
(&smu_part_access);
+
mutex_unlock
(&smu_part_access);
return part;
}
return part;
}