mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
Pull pnpacpi into acpica branch
This commit is contained in:
commit
ed03f430cd
2497 changed files with 166602 additions and 71335 deletions
|
|
@ -172,21 +172,21 @@ static void container_notify_cb(acpi_handle handle, u32 type, void *context)
|
|||
if (ACPI_FAILURE(status) || !device) {
|
||||
result = container_device_add(&device, handle);
|
||||
if (!result)
|
||||
kobject_hotplug(&device->kobj,
|
||||
KOBJ_ONLINE);
|
||||
kobject_uevent(&device->kobj,
|
||||
KOBJ_ONLINE);
|
||||
else
|
||||
printk("Failed to add container\n");
|
||||
}
|
||||
} else {
|
||||
if (ACPI_SUCCESS(status)) {
|
||||
/* device exist and this is a remove request */
|
||||
kobject_hotplug(&device->kobj, KOBJ_OFFLINE);
|
||||
kobject_uevent(&device->kobj, KOBJ_OFFLINE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ACPI_NOTIFY_EJECT_REQUEST:
|
||||
if (!acpi_bus_get_device(handle, &device) && device) {
|
||||
kobject_hotplug(&device->kobj, KOBJ_OFFLINE);
|
||||
kobject_uevent(&device->kobj, KOBJ_OFFLINE);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -316,7 +316,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
|
|||
if (!link || !irq)
|
||||
return_VALUE(-EINVAL);
|
||||
|
||||
resource = kmalloc(sizeof(*resource) + 1, GFP_KERNEL);
|
||||
resource = kmalloc(sizeof(*resource) + 1, GFP_ATOMIC);
|
||||
if (!resource)
|
||||
return_VALUE(-ENOMEM);
|
||||
|
||||
|
|
|
|||
|
|
@ -748,7 +748,7 @@ int acpi_processor_device_add(acpi_handle handle, struct acpi_device **device)
|
|||
return_VALUE(-ENODEV);
|
||||
|
||||
if ((pr->id >= 0) && (pr->id < NR_CPUS)) {
|
||||
kobject_hotplug(&(*device)->kobj, KOBJ_ONLINE);
|
||||
kobject_uevent(&(*device)->kobj, KOBJ_ONLINE);
|
||||
}
|
||||
return_VALUE(0);
|
||||
}
|
||||
|
|
@ -788,13 +788,13 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data)
|
|||
}
|
||||
|
||||
if (pr->id >= 0 && (pr->id < NR_CPUS)) {
|
||||
kobject_hotplug(&device->kobj, KOBJ_OFFLINE);
|
||||
kobject_uevent(&device->kobj, KOBJ_OFFLINE);
|
||||
break;
|
||||
}
|
||||
|
||||
result = acpi_processor_start(device);
|
||||
if ((!result) && ((pr->id >= 0) && (pr->id < NR_CPUS))) {
|
||||
kobject_hotplug(&device->kobj, KOBJ_ONLINE);
|
||||
kobject_uevent(&device->kobj, KOBJ_ONLINE);
|
||||
} else {
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
|
||||
"Device [%s] failed to start\n",
|
||||
|
|
@ -818,7 +818,7 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data)
|
|||
}
|
||||
|
||||
if ((pr->id < NR_CPUS) && (cpu_present(pr->id)))
|
||||
kobject_hotplug(&device->kobj, KOBJ_OFFLINE);
|
||||
kobject_uevent(&device->kobj, KOBJ_OFFLINE);
|
||||
break;
|
||||
default:
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
|
||||
|
|
|
|||
|
|
@ -102,8 +102,8 @@ static int cpu_has_cpufreq(unsigned int cpu)
|
|||
{
|
||||
struct cpufreq_policy policy;
|
||||
if (!acpi_thermal_cpufreq_is_init || cpufreq_get_policy(&policy, cpu))
|
||||
return -ENODEV;
|
||||
return 0;
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int acpi_thermal_cpufreq_increase(unsigned int cpu)
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ static struct kobj_type ktype_acpi_ns = {
|
|||
.release = acpi_device_release,
|
||||
};
|
||||
|
||||
static int namespace_hotplug(struct kset *kset, struct kobject *kobj,
|
||||
static int namespace_uevent(struct kset *kset, struct kobject *kobj,
|
||||
char **envp, int num_envp, char *buffer,
|
||||
int buffer_size)
|
||||
{
|
||||
|
|
@ -89,8 +89,8 @@ static int namespace_hotplug(struct kset *kset, struct kobject *kobj,
|
|||
if (!dev->driver)
|
||||
return 0;
|
||||
|
||||
if (add_hotplug_env_var(envp, num_envp, &i, buffer, buffer_size, &len,
|
||||
"PHYSDEVDRIVER=%s", dev->driver->name))
|
||||
if (add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &len,
|
||||
"PHYSDEVDRIVER=%s", dev->driver->name))
|
||||
return -ENOMEM;
|
||||
|
||||
envp[i] = NULL;
|
||||
|
|
@ -98,8 +98,8 @@ static int namespace_hotplug(struct kset *kset, struct kobject *kobj,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static struct kset_hotplug_ops namespace_hotplug_ops = {
|
||||
.hotplug = &namespace_hotplug,
|
||||
static struct kset_uevent_ops namespace_uevent_ops = {
|
||||
.uevent = &namespace_uevent,
|
||||
};
|
||||
|
||||
static struct kset acpi_namespace_kset = {
|
||||
|
|
@ -108,7 +108,7 @@ static struct kset acpi_namespace_kset = {
|
|||
},
|
||||
.subsys = &acpi_subsys,
|
||||
.ktype = &ktype_acpi_ns,
|
||||
.hotplug_ops = &namespace_hotplug_ops,
|
||||
.uevent_ops = &namespace_uevent_ops,
|
||||
};
|
||||
|
||||
static void acpi_device_register(struct acpi_device *device,
|
||||
|
|
@ -347,7 +347,7 @@ static int acpi_bus_get_wakeup_device_flags(struct acpi_device *device)
|
|||
}
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
ACPI hotplug sysfs device file support
|
||||
ACPI sysfs device file support
|
||||
-------------------------------------------------------------------------- */
|
||||
static ssize_t acpi_eject_store(struct acpi_device *device,
|
||||
const char *buf, size_t count);
|
||||
|
|
|
|||
Loading…
Reference in a new issue