diff options
Diffstat (limited to 'drivers/macintosh')
-rw-r--r-- | drivers/macintosh/macio-adb.c | 1 | ||||
-rw-r--r-- | drivers/macintosh/smu.c | 4 | ||||
-rw-r--r-- | drivers/macintosh/therm_adt746x.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_pm81.c | 6 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_pm91.c | 9 |
5 files changed, 11 insertions, 11 deletions
diff --git a/drivers/macintosh/macio-adb.c b/drivers/macintosh/macio-adb.c index 79119f56e82d..bd6da7a9c55b 100644 --- a/drivers/macintosh/macio-adb.c +++ b/drivers/macintosh/macio-adb.c | |||
@@ -155,6 +155,7 @@ static int macio_adb_reset_bus(void) | |||
155 | while ((in_8(&adb->ctrl.r) & ADB_RST) != 0) { | 155 | while ((in_8(&adb->ctrl.r) & ADB_RST) != 0) { |
156 | if (--timeout == 0) { | 156 | if (--timeout == 0) { |
157 | out_8(&adb->ctrl.r, in_8(&adb->ctrl.r) & ~ADB_RST); | 157 | out_8(&adb->ctrl.r, in_8(&adb->ctrl.r) & ~ADB_RST); |
158 | spin_unlock_irqrestore(&macio_lock, flags); | ||
158 | return -1; | 159 | return -1; |
159 | } | 160 | } |
160 | } | 161 | } |
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c index 888448cf7f1f..c9da5c4c167d 100644 --- a/drivers/macintosh/smu.c +++ b/drivers/macintosh/smu.c | |||
@@ -1183,8 +1183,10 @@ static ssize_t smu_read_command(struct file *file, struct smu_private *pp, | |||
1183 | return -EOVERFLOW; | 1183 | return -EOVERFLOW; |
1184 | spin_lock_irqsave(&pp->lock, flags); | 1184 | spin_lock_irqsave(&pp->lock, flags); |
1185 | if (pp->cmd.status == 1) { | 1185 | if (pp->cmd.status == 1) { |
1186 | if (file->f_flags & O_NONBLOCK) | 1186 | if (file->f_flags & O_NONBLOCK) { |
1187 | spin_unlock_irqrestore(&pp->lock, flags); | ||
1187 | return -EAGAIN; | 1188 | return -EAGAIN; |
1189 | } | ||
1188 | add_wait_queue(&pp->wait, &wait); | 1190 | add_wait_queue(&pp->wait, &wait); |
1189 | for (;;) { | 1191 | for (;;) { |
1190 | set_current_state(TASK_INTERRUPTIBLE); | 1192 | set_current_state(TASK_INTERRUPTIBLE); |
diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c index c42eeb43042d..16d82f17ae82 100644 --- a/drivers/macintosh/therm_adt746x.c +++ b/drivers/macintosh/therm_adt746x.c | |||
@@ -182,6 +182,7 @@ remove_thermostat(struct i2c_client *client) | |||
182 | 182 | ||
183 | thermostat = NULL; | 183 | thermostat = NULL; |
184 | 184 | ||
185 | i2c_set_clientdata(client, NULL); | ||
185 | kfree(th); | 186 | kfree(th); |
186 | 187 | ||
187 | return 0; | 188 | return 0; |
@@ -399,6 +400,7 @@ static int probe_thermostat(struct i2c_client *client, | |||
399 | rc = read_reg(th, CONFIG_REG); | 400 | rc = read_reg(th, CONFIG_REG); |
400 | if (rc < 0) { | 401 | if (rc < 0) { |
401 | dev_err(&client->dev, "Thermostat failed to read config!\n"); | 402 | dev_err(&client->dev, "Thermostat failed to read config!\n"); |
403 | i2c_set_clientdata(client, NULL); | ||
402 | kfree(th); | 404 | kfree(th); |
403 | return -ENODEV; | 405 | return -ENODEV; |
404 | } | 406 | } |
diff --git a/drivers/macintosh/windfarm_pm81.c b/drivers/macintosh/windfarm_pm81.c index 129cda737880..749d174b0dc6 100644 --- a/drivers/macintosh/windfarm_pm81.c +++ b/drivers/macintosh/windfarm_pm81.c | |||
@@ -757,10 +757,8 @@ static int __devexit wf_smu_remove(struct platform_device *ddev) | |||
757 | wf_put_control(cpufreq_clamp); | 757 | wf_put_control(cpufreq_clamp); |
758 | 758 | ||
759 | /* Destroy control loops state structures */ | 759 | /* Destroy control loops state structures */ |
760 | if (wf_smu_sys_fans) | 760 | kfree(wf_smu_sys_fans); |
761 | kfree(wf_smu_sys_fans); | 761 | kfree(wf_smu_cpu_fans); |
762 | if (wf_smu_cpu_fans) | ||
763 | kfree(wf_smu_cpu_fans); | ||
764 | 762 | ||
765 | return 0; | 763 | return 0; |
766 | } | 764 | } |
diff --git a/drivers/macintosh/windfarm_pm91.c b/drivers/macintosh/windfarm_pm91.c index bea99168ff35..344273235124 100644 --- a/drivers/macintosh/windfarm_pm91.c +++ b/drivers/macintosh/windfarm_pm91.c | |||
@@ -687,12 +687,9 @@ static int __devexit wf_smu_remove(struct platform_device *ddev) | |||
687 | wf_put_control(cpufreq_clamp); | 687 | wf_put_control(cpufreq_clamp); |
688 | 688 | ||
689 | /* Destroy control loops state structures */ | 689 | /* Destroy control loops state structures */ |
690 | if (wf_smu_slots_fans) | 690 | kfree(wf_smu_slots_fans); |
691 | kfree(wf_smu_cpu_fans); | 691 | kfree(wf_smu_drive_fans); |
692 | if (wf_smu_drive_fans) | 692 | kfree(wf_smu_cpu_fans); |
693 | kfree(wf_smu_cpu_fans); | ||
694 | if (wf_smu_cpu_fans) | ||
695 | kfree(wf_smu_cpu_fans); | ||
696 | 693 | ||
697 | return 0; | 694 | return 0; |
698 | } | 695 | } |