+5
drivers/hwmon/coretemp.c
+5
drivers/hwmon/coretemp.c
···
815
815
if (err)
816
816
goto exit;
817
817
818
+
get_online_cpus();
818
819
for_each_online_cpu(i)
819
820
get_core_online(i);
820
821
821
822
#ifndef CONFIG_HOTPLUG_CPU
822
823
if (list_empty(&pdev_list)) {
824
+
put_online_cpus();
823
825
err = -ENODEV;
824
826
goto exit_driver_unreg;
825
827
}
826
828
#endif
827
829
828
830
register_hotcpu_notifier(&coretemp_cpu_notifier);
831
+
put_online_cpus();
829
832
return 0;
830
833
831
834
#ifndef CONFIG_HOTPLUG_CPU
···
843
840
{
844
841
struct pdev_entry *p, *n;
845
842
843
+
get_online_cpus();
846
844
unregister_hotcpu_notifier(&coretemp_cpu_notifier);
847
845
mutex_lock(&pdev_list_mutex);
848
846
list_for_each_entry_safe(p, n, &pdev_list, list) {
···
852
848
kfree(p);
853
849
}
854
850
mutex_unlock(&pdev_list_mutex);
851
+
put_online_cpus();
855
852
platform_driver_unregister(&coretemp_driver);
856
853
}
857
854
+13
-2
drivers/hwmon/fam15h_power.c
+13
-2
drivers/hwmon/fam15h_power.c
···
129
129
* counter saturations resulting in bogus power readings.
130
130
* We correct this value ourselves to cope with older BIOSes.
131
131
*/
132
-
static DEFINE_PCI_DEVICE_TABLE(affected_device) = {
132
+
static const struct pci_device_id affected_device[] = {
133
133
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) },
134
134
{ 0 }
135
135
};
136
136
137
-
static void __devinit tweak_runavg_range(struct pci_dev *pdev)
137
+
static void tweak_runavg_range(struct pci_dev *pdev)
138
138
{
139
139
u32 val;
140
140
···
157
157
PCI_DEVFN(PCI_SLOT(pdev->devfn), 5),
158
158
REG_TDP_RUNNING_AVERAGE, val);
159
159
}
160
+
161
+
#ifdef CONFIG_PM
162
+
static int fam15h_power_resume(struct pci_dev *pdev)
163
+
{
164
+
tweak_runavg_range(pdev);
165
+
return 0;
166
+
}
167
+
#else
168
+
#define fam15h_power_resume NULL
169
+
#endif
160
170
161
171
static void __devinit fam15h_power_init_data(struct pci_dev *f4,
162
172
struct fam15h_power_data *data)
···
266
256
.id_table = fam15h_power_id_table,
267
257
.probe = fam15h_power_probe,
268
258
.remove = __devexit_p(fam15h_power_remove),
259
+
.resume = fam15h_power_resume,
269
260
};
270
261
271
262
module_pci_driver(fam15h_power_driver);
+5
drivers/hwmon/via-cputemp.c
+5
drivers/hwmon/via-cputemp.c
···
328
328
if (err)
329
329
goto exit;
330
330
331
+
get_online_cpus();
331
332
for_each_online_cpu(i) {
332
333
struct cpuinfo_x86 *c = &cpu_data(i);
333
334
···
348
347
349
348
#ifndef CONFIG_HOTPLUG_CPU
350
349
if (list_empty(&pdev_list)) {
350
+
put_online_cpus();
351
351
err = -ENODEV;
352
352
goto exit_driver_unreg;
353
353
}
354
354
#endif
355
355
356
356
register_hotcpu_notifier(&via_cputemp_cpu_notifier);
357
+
put_online_cpus();
357
358
return 0;
358
359
359
360
#ifndef CONFIG_HOTPLUG_CPU
···
370
367
{
371
368
struct pdev_entry *p, *n;
372
369
370
+
get_online_cpus();
373
371
unregister_hotcpu_notifier(&via_cputemp_cpu_notifier);
374
372
mutex_lock(&pdev_list_mutex);
375
373
list_for_each_entry_safe(p, n, &pdev_list, list) {
···
379
375
kfree(p);
380
376
}
381
377
mutex_unlock(&pdev_list_mutex);
378
+
put_online_cpus();
382
379
platform_driver_unregister(&via_cputemp_driver);
383
380
}
384
381