Commit c523aef0 authored by Len Brown's avatar Len Brown

Merge branches 'release', 'button-sysfs', 'misc', 'mismatch', 'randconfig' and...

Merge branches 'release', 'button-sysfs', 'misc', 'mismatch', 'randconfig' and 'toshiba' into release
...@@ -283,24 +283,23 @@ config ACPI_TOSHIBA ...@@ -283,24 +283,23 @@ config ACPI_TOSHIBA
If you have a legacy free Toshiba laptop (such as the Libretto L1 If you have a legacy free Toshiba laptop (such as the Libretto L1
series), say Y. series), say Y.
config ACPI_CUSTOM_DSDT config ACPI_CUSTOM_DSDT_FILE
bool "Include Custom DSDT" string "Custom DSDT Table file to include"
default ""
depends on !STANDALONE depends on !STANDALONE
default n
help help
This option supports a custom DSDT by linking it into the kernel. This option supports a custom DSDT by linking it into the kernel.
See Documentation/acpi/dsdt-override.txt See Documentation/acpi/dsdt-override.txt
If unsure, say N.
config ACPI_CUSTOM_DSDT_FILE
string "Custom DSDT Table file to include"
depends on ACPI_CUSTOM_DSDT
default ""
help
Enter the full path name to the file which includes the AmlCode Enter the full path name to the file which includes the AmlCode
declaration. declaration.
If unsure, don't enter a file name.
config ACPI_CUSTOM_DSDT
bool
default ACPI_CUSTOM_DSDT_FILE != ""
config ACPI_CUSTOM_DSDT_INITRD config ACPI_CUSTOM_DSDT_INITRD
bool "Read Custom DSDT from initramfs" bool "Read Custom DSDT from initramfs"
depends on BLK_DEV_INITRD depends on BLK_DEV_INITRD
......
...@@ -776,7 +776,7 @@ static int __init acpi_init(void) ...@@ -776,7 +776,7 @@ static int __init acpi_init(void)
acpi_kobj = kobject_create_and_add("acpi", firmware_kobj); acpi_kobj = kobject_create_and_add("acpi", firmware_kobj);
if (!acpi_kobj) { if (!acpi_kobj) {
printk(KERN_WARNING "%s: kset create error\n", __FUNCTION__); printk(KERN_WARNING "%s: kset create error\n", __func__);
acpi_kobj = NULL; acpi_kobj = NULL;
} }
......
...@@ -449,6 +449,7 @@ static int acpi_button_add(struct acpi_device *device) ...@@ -449,6 +449,7 @@ static int acpi_button_add(struct acpi_device *device)
input->phys = button->phys; input->phys = button->phys;
input->id.bustype = BUS_HOST; input->id.bustype = BUS_HOST;
input->id.product = button->type; input->id.product = button->type;
input->dev.parent = &device->dev;
switch (button->type) { switch (button->type) {
case ACPI_BUTTON_TYPE_POWER: case ACPI_BUTTON_TYPE_POWER:
......
...@@ -1237,7 +1237,7 @@ int acpi_check_resource_conflict(struct resource *res) ...@@ -1237,7 +1237,7 @@ int acpi_check_resource_conflict(struct resource *res)
if (clash) { if (clash) {
if (acpi_enforce_resources != ENFORCE_RESOURCES_NO) { if (acpi_enforce_resources != ENFORCE_RESOURCES_NO) {
printk(KERN_INFO "%sACPI: %s resource %s [0x%llx-0x%llx]" printk("%sACPI: %s resource %s [0x%llx-0x%llx]"
" conflicts with ACPI region %s" " conflicts with ACPI region %s"
" [0x%llx-0x%llx]\n", " [0x%llx-0x%llx]\n",
acpi_enforce_resources == ENFORCE_RESOURCES_LAX acpi_enforce_resources == ENFORCE_RESOURCES_LAX
......
...@@ -184,7 +184,7 @@ static void acpi_pci_bridge_scan(struct acpi_device *device) ...@@ -184,7 +184,7 @@ static void acpi_pci_bridge_scan(struct acpi_device *device)
} }
} }
static int acpi_pci_root_add(struct acpi_device *device) static int __devinit acpi_pci_root_add(struct acpi_device *device)
{ {
int result = 0; int result = 0;
struct acpi_pci_root *root = NULL; struct acpi_pci_root *root = NULL;
......
...@@ -888,8 +888,8 @@ int acpi_processor_device_add(acpi_handle handle, struct acpi_device **device) ...@@ -888,8 +888,8 @@ int acpi_processor_device_add(acpi_handle handle, struct acpi_device **device)
return 0; return 0;
} }
static void static void __ref acpi_processor_hotplug_notify(acpi_handle handle,
acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data) u32 event, void *data)
{ {
struct acpi_processor *pr; struct acpi_processor *pr;
struct acpi_device *device = NULL; struct acpi_device *device = NULL;
...@@ -899,9 +899,10 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data) ...@@ -899,9 +899,10 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data)
switch (event) { switch (event) {
case ACPI_NOTIFY_BUS_CHECK: case ACPI_NOTIFY_BUS_CHECK:
case ACPI_NOTIFY_DEVICE_CHECK: case ACPI_NOTIFY_DEVICE_CHECK:
printk("Processor driver received %s event\n", ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"Processor driver received %s event\n",
(event == ACPI_NOTIFY_BUS_CHECK) ? (event == ACPI_NOTIFY_BUS_CHECK) ?
"ACPI_NOTIFY_BUS_CHECK" : "ACPI_NOTIFY_DEVICE_CHECK"); "ACPI_NOTIFY_BUS_CHECK" : "ACPI_NOTIFY_DEVICE_CHECK"));
if (!is_processor_present(handle)) if (!is_processor_present(handle))
break; break;
......
...@@ -966,7 +966,7 @@ static void acpi_device_set_id(struct acpi_device *device, ...@@ -966,7 +966,7 @@ static void acpi_device_set_id(struct acpi_device *device,
case ACPI_BUS_TYPE_DEVICE: case ACPI_BUS_TYPE_DEVICE:
status = acpi_get_object_info(handle, &buffer); status = acpi_get_object_info(handle, &buffer);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
printk(KERN_ERR PREFIX "%s: Error reading device info\n", __FUNCTION__); printk(KERN_ERR PREFIX "%s: Error reading device info\n", __func__);
return; return;
} }
......
...@@ -504,7 +504,7 @@ static void acpi_power_off_prepare(void) ...@@ -504,7 +504,7 @@ static void acpi_power_off_prepare(void)
static void acpi_power_off(void) static void acpi_power_off(void)
{ {
/* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */ /* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */
printk("%s called\n", __FUNCTION__); printk("%s called\n", __func__);
local_irq_disable(); local_irq_disable();
acpi_enable_wakeup_device(ACPI_STATE_S5); acpi_enable_wakeup_device(ACPI_STATE_S5);
acpi_enter_sleep_state(ACPI_STATE_S5); acpi_enter_sleep_state(ACPI_STATE_S5);
......
...@@ -319,7 +319,7 @@ void acpi_irq_stats_init(void) ...@@ -319,7 +319,7 @@ void acpi_irq_stats_init(void)
goto fail; goto fail;
for (i = 0; i < num_counters; ++i) { for (i = 0; i < num_counters; ++i) {
char buffer[10]; char buffer[12];
char *name; char *name;
if (i < num_gpes) if (i < num_gpes)
......
...@@ -99,6 +99,13 @@ MODULE_LICENSE("GPL"); ...@@ -99,6 +99,13 @@ MODULE_LICENSE("GPL");
#define HCI_VIDEO_OUT_CRT 0x2 #define HCI_VIDEO_OUT_CRT 0x2
#define HCI_VIDEO_OUT_TV 0x4 #define HCI_VIDEO_OUT_TV 0x4
static const struct acpi_device_id toshiba_device_ids[] = {
{"TOS6200", 0},
{"TOS1900", 0},
{"", 0},
};
MODULE_DEVICE_TABLE(acpi, toshiba_device_ids);
/* utility /* utility
*/ */
......
...@@ -109,7 +109,7 @@ void acpi_ut_track_stack_ptr(void) ...@@ -109,7 +109,7 @@ void acpi_ut_track_stack_ptr(void)
* RETURN: Updated pointer to the function name * RETURN: Updated pointer to the function name
* *
* DESCRIPTION: Remove the "Acpi" prefix from the function name, if present. * DESCRIPTION: Remove the "Acpi" prefix from the function name, if present.
* This allows compiler macros such as __FUNCTION__ to be used * This allows compiler macros such as __func__ to be used
* with no change to the debug output. * with no change to the debug output.
* *
******************************************************************************/ ******************************************************************************/
......
...@@ -407,6 +407,12 @@ acpi_evaluate_reference(acpi_handle handle, ...@@ -407,6 +407,12 @@ acpi_evaluate_reference(acpi_handle handle,
break; break;
} }
if (!element->reference.handle) {
printk(KERN_WARNING PREFIX "Invalid reference in"
" package %s\n", pathname);
status = AE_NULL_ENTRY;
break;
}
/* Get the acpi_handle. */ /* Get the acpi_handle. */
list->handles[i] = element->reference.handle; list->handles[i] = element->reference.handle;
......
...@@ -1201,7 +1201,7 @@ static int acpi_video_bus_ROM_seq_show(struct seq_file *seq, void *offset) ...@@ -1201,7 +1201,7 @@ static int acpi_video_bus_ROM_seq_show(struct seq_file *seq, void *offset)
if (!video) if (!video)
goto end; goto end;
printk(KERN_INFO PREFIX "Please implement %s\n", __FUNCTION__); printk(KERN_INFO PREFIX "Please implement %s\n", __func__);
seq_printf(seq, "<TODO>\n"); seq_printf(seq, "<TODO>\n");
end: end:
......
...@@ -765,7 +765,7 @@ static struct led_classdev mail_led = { ...@@ -765,7 +765,7 @@ static struct led_classdev mail_led = {
.brightness_set = mail_led_set, .brightness_set = mail_led_set,
}; };
static int __init acer_led_init(struct device *dev) static int __devinit acer_led_init(struct device *dev)
{ {
return led_classdev_register(dev, &mail_led); return led_classdev_register(dev, &mail_led);
} }
...@@ -798,7 +798,7 @@ static struct backlight_ops acer_bl_ops = { ...@@ -798,7 +798,7 @@ static struct backlight_ops acer_bl_ops = {
.update_status = update_bl_status, .update_status = update_bl_status,
}; };
static int __init acer_backlight_init(struct device *dev) static int __devinit acer_backlight_init(struct device *dev)
{ {
struct backlight_device *bd; struct backlight_device *bd;
...@@ -817,7 +817,7 @@ static int __init acer_backlight_init(struct device *dev) ...@@ -817,7 +817,7 @@ static int __init acer_backlight_init(struct device *dev)
return 0; return 0;
} }
static void __exit acer_backlight_exit(void) static void acer_backlight_exit(void)
{ {
backlight_device_unregister(acer_backlight_device); backlight_device_unregister(acer_backlight_device);
} }
......
...@@ -272,21 +272,29 @@ static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state) ...@@ -272,21 +272,29 @@ static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state)
{ {
acpi_handle handle = DEVICE_ACPI_HANDLE(&dev->dev); acpi_handle handle = DEVICE_ACPI_HANDLE(&dev->dev);
acpi_handle tmp; acpi_handle tmp;
static int state_conv[] = { static const u8 state_conv[] = {
[0] = 0, [PCI_D0] = ACPI_STATE_D0,
[1] = 1, [PCI_D1] = ACPI_STATE_D1,
[2] = 2, [PCI_D2] = ACPI_STATE_D2,
[3] = 3, [PCI_D3hot] = ACPI_STATE_D3,
[4] = 3 [PCI_D3cold] = ACPI_STATE_D3
}; };
int acpi_state = state_conv[(int __force) state];
if (!handle) if (!handle)
return -ENODEV; return -ENODEV;
/* If the ACPI device has _EJ0, ignore the device */ /* If the ACPI device has _EJ0, ignore the device */
if (ACPI_SUCCESS(acpi_get_handle(handle, "_EJ0", &tmp))) if (ACPI_SUCCESS(acpi_get_handle(handle, "_EJ0", &tmp)))
return 0; return 0;
return acpi_bus_set_power(handle, acpi_state);
switch (state) {
case PCI_D0:
case PCI_D1:
case PCI_D2:
case PCI_D3hot:
case PCI_D3cold:
return acpi_bus_set_power(handle, state_conv[state]);
}
return -EINVAL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment