mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
Merge branch 'processor-procfs-2.6.32' into release
This commit is contained in:
commit
cbeee13570
5 changed files with 38 additions and 9 deletions
|
@ -682,6 +682,7 @@ static int acpi_processor_get_power_info(struct acpi_processor *pr)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ACPI_PROCFS
|
||||
static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset)
|
||||
{
|
||||
struct acpi_processor *pr = seq->private;
|
||||
|
@ -761,7 +762,7 @@ static const struct file_operations acpi_processor_power_fops = {
|
|||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* acpi_idle_bm_check - checks if bus master activity was detected
|
||||
|
@ -1162,7 +1163,9 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr,
|
|||
{
|
||||
acpi_status status = 0;
|
||||
static int first_run;
|
||||
#ifdef CONFIG_ACPI_PROCFS
|
||||
struct proc_dir_entry *entry = NULL;
|
||||
#endif
|
||||
unsigned int i;
|
||||
|
||||
if (boot_option_idle_override)
|
||||
|
@ -1219,7 +1222,7 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr,
|
|||
pr->power.states[i].type);
|
||||
printk(")\n");
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ACPI_PROCFS
|
||||
/* 'power' [R] */
|
||||
entry = proc_create_data(ACPI_PROCESSOR_FILE_POWER,
|
||||
S_IRUGO, acpi_device_dir(device),
|
||||
|
@ -1227,6 +1230,7 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr,
|
|||
acpi_driver_data(device));
|
||||
if (!entry)
|
||||
return -EIO;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1239,9 +1243,11 @@ int acpi_processor_power_exit(struct acpi_processor *pr,
|
|||
cpuidle_unregister_device(&pr->power.dev);
|
||||
pr->flags.power_setup_done = 0;
|
||||
|
||||
#ifdef CONFIG_ACPI_PROCFS
|
||||
if (acpi_device_dir(device))
|
||||
remove_proc_entry(ACPI_PROCESSOR_FILE_POWER,
|
||||
acpi_device_dir(device));
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue