diff options
Diffstat (limited to 'drivers/macintosh')
-rw-r--r-- | drivers/macintosh/smu.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c index 4eb05d7143d8..f4516ca7aa3a 100644 --- a/drivers/macintosh/smu.c +++ b/drivers/macintosh/smu.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/delay.h> | 35 | #include <linux/delay.h> |
36 | #include <linux/sysdev.h> | 36 | #include <linux/sysdev.h> |
37 | #include <linux/poll.h> | 37 | #include <linux/poll.h> |
38 | #include <linux/mutex.h> | ||
38 | 39 | ||
39 | #include <asm/byteorder.h> | 40 | #include <asm/byteorder.h> |
40 | #include <asm/io.h> | 41 | #include <asm/io.h> |
@@ -92,7 +93,7 @@ struct smu_device { | |||
92 | * for now, just hard code that | 93 | * for now, just hard code that |
93 | */ | 94 | */ |
94 | static struct smu_device *smu; | 95 | static struct smu_device *smu; |
95 | static DECLARE_MUTEX(smu_part_access); | 96 | static DEFINE_MUTEX(smu_part_access); |
96 | 97 | ||
97 | static void smu_i2c_retry(unsigned long data); | 98 | static void smu_i2c_retry(unsigned long data); |
98 | 99 | ||
@@ -976,11 +977,11 @@ struct smu_sdbp_header *__smu_get_sdb_partition(int id, unsigned int *size, | |||
976 | 977 | ||
977 | if (interruptible) { | 978 | if (interruptible) { |
978 | int rc; | 979 | int rc; |
979 | rc = down_interruptible(&smu_part_access); | 980 | rc = mutex_lock_interruptible(&smu_part_access); |
980 | if (rc) | 981 | if (rc) |
981 | return ERR_PTR(rc); | 982 | return ERR_PTR(rc); |
982 | } else | 983 | } else |
983 | down(&smu_part_access); | 984 | mutex_lock(&smu_part_access); |
984 | 985 | ||
985 | part = (struct smu_sdbp_header *)get_property(smu->of_node, | 986 | part = (struct smu_sdbp_header *)get_property(smu->of_node, |
986 | pname, size); | 987 | pname, size); |
@@ -990,7 +991,7 @@ struct smu_sdbp_header *__smu_get_sdb_partition(int id, unsigned int *size, | |||
990 | if (part != NULL && size) | 991 | if (part != NULL && size) |
991 | *size = part->len << 2; | 992 | *size = part->len << 2; |
992 | } | 993 | } |
993 | up(&smu_part_access); | 994 | mutex_unlock(&smu_part_access); |
994 | return part; | 995 | return part; |
995 | } | 996 | } |
996 | 997 | ||