git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
drivers
/
macintosh
/
smu.c
diff --git
a/drivers/macintosh/smu.c
b/drivers/macintosh/smu.c
index
f4516ca
..
db2ae71
100644
(file)
--- a/
drivers/macintosh/smu.c
+++ b/
drivers/macintosh/smu.c
@@
-35,7
+35,6
@@
#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>
@@
-93,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
FIN
E_MUTEX(smu_part_access);
+static DE
CLAR
E_MUTEX(smu_part_access);
static void smu_i2c_retry(unsigned long data);
static void smu_i2c_retry(unsigned long data);
@@
-630,6
+629,8
@@
static struct of_platform_driver smu_of_platform_driver =
static int __init smu_init_sysfs(void)
{
static int __init smu_init_sysfs(void)
{
+ int rc;
+
/*
* Due to sysfs bogosity, a sysdev is not a real device, so
* we should in fact create both if we want sysdev semantics
/*
* Due to sysfs bogosity, a sysdev is not a real device, so
* we should in fact create both if we want sysdev semantics
@@
-638,7
+639,7
@@
static int __init smu_init_sysfs(void)
* I'm a bit too far from figuring out how that works with those
* new chipsets, but that will come back and bite us
*/
* I'm a bit too far from figuring out how that works with those
* new chipsets, but that will come back and bite us
*/
- of_register_driver(&smu_of_platform_driver);
+
rc =
of_register_driver(&smu_of_platform_driver);
return 0;
}
return 0;
}
@@
-977,11
+978,11
@@
struct smu_sdbp_header *__smu_get_sdb_partition(int id, unsigned int *size,
if (interruptible) {
int rc;
if (interruptible) {
int rc;
- rc =
mutex_lock
_interruptible(&smu_part_access);
+ rc =
down
_interruptible(&smu_part_access);
if (rc)
return ERR_PTR(rc);
} else
if (rc)
return ERR_PTR(rc);
} else
-
mutex_lock
(&smu_part_access);
+
down
(&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);
@@
-991,7
+992,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;
}
-
mutex_unlock
(&smu_part_access);
+
up
(&smu_part_access);
return part;
}
return part;
}