diff options
Diffstat (limited to 'drivers/macintosh/smu.c')
-rw-r--r-- | drivers/macintosh/smu.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c index e58c3d33e035..116a49ce74b2 100644 --- a/drivers/macintosh/smu.c +++ b/drivers/macintosh/smu.c | |||
@@ -19,7 +19,6 @@ | |||
19 | * the userland interface | 19 | * the userland interface |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/smp_lock.h> | ||
23 | #include <linux/types.h> | 22 | #include <linux/types.h> |
24 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
25 | #include <linux/device.h> | 24 | #include <linux/device.h> |
@@ -97,6 +96,7 @@ struct smu_device { | |||
97 | * I don't think there will ever be more than one SMU, so | 96 | * I don't think there will ever be more than one SMU, so |
98 | * for now, just hard code that | 97 | * for now, just hard code that |
99 | */ | 98 | */ |
99 | static DEFINE_MUTEX(smu_mutex); | ||
100 | static struct smu_device *smu; | 100 | static struct smu_device *smu; |
101 | static DEFINE_MUTEX(smu_part_access); | 101 | static DEFINE_MUTEX(smu_part_access); |
102 | static int smu_irq_inited; | 102 | static int smu_irq_inited; |
@@ -645,8 +645,7 @@ static void smu_expose_childs(struct work_struct *unused) | |||
645 | 645 | ||
646 | static DECLARE_WORK(smu_expose_childs_work, smu_expose_childs); | 646 | static DECLARE_WORK(smu_expose_childs_work, smu_expose_childs); |
647 | 647 | ||
648 | static int smu_platform_probe(struct platform_device* dev, | 648 | static int smu_platform_probe(struct platform_device* dev) |
649 | const struct of_device_id *match) | ||
650 | { | 649 | { |
651 | if (!smu) | 650 | if (!smu) |
652 | return -ENODEV; | 651 | return -ENODEV; |
@@ -669,7 +668,7 @@ static const struct of_device_id smu_platform_match[] = | |||
669 | {}, | 668 | {}, |
670 | }; | 669 | }; |
671 | 670 | ||
672 | static struct of_platform_driver smu_of_platform_driver = | 671 | static struct platform_driver smu_of_platform_driver = |
673 | { | 672 | { |
674 | .driver = { | 673 | .driver = { |
675 | .name = "smu", | 674 | .name = "smu", |
@@ -689,7 +688,7 @@ static int __init smu_init_sysfs(void) | |||
689 | * I'm a bit too far from figuring out how that works with those | 688 | * I'm a bit too far from figuring out how that works with those |
690 | * new chipsets, but that will come back and bite us | 689 | * new chipsets, but that will come back and bite us |
691 | */ | 690 | */ |
692 | of_register_platform_driver(&smu_of_platform_driver); | 691 | platform_driver_register(&smu_of_platform_driver); |
693 | return 0; | 692 | return 0; |
694 | } | 693 | } |
695 | 694 | ||
@@ -1095,12 +1094,12 @@ static int smu_open(struct inode *inode, struct file *file) | |||
1095 | pp->mode = smu_file_commands; | 1094 | pp->mode = smu_file_commands; |
1096 | init_waitqueue_head(&pp->wait); | 1095 | init_waitqueue_head(&pp->wait); |
1097 | 1096 | ||
1098 | lock_kernel(); | 1097 | mutex_lock(&smu_mutex); |
1099 | spin_lock_irqsave(&smu_clist_lock, flags); | 1098 | spin_lock_irqsave(&smu_clist_lock, flags); |
1100 | list_add(&pp->list, &smu_clist); | 1099 | list_add(&pp->list, &smu_clist); |
1101 | spin_unlock_irqrestore(&smu_clist_lock, flags); | 1100 | spin_unlock_irqrestore(&smu_clist_lock, flags); |
1102 | file->private_data = pp; | 1101 | file->private_data = pp; |
1103 | unlock_kernel(); | 1102 | mutex_unlock(&smu_mutex); |
1104 | 1103 | ||
1105 | return 0; | 1104 | return 0; |
1106 | } | 1105 | } |