Merge branches 'release', 'button-sysfs', 'misc', 'mismatch', 'randconfig' and 'toshi...
authorLen Brown <len.brown@intel.com>
Thu, 13 Mar 2008 05:59:49 +0000 (01:59 -0400)
committerLen Brown <len.brown@intel.com>
Thu, 13 Mar 2008 05:59:49 +0000 (01:59 -0400)
15 files changed:
drivers/acpi/Kconfig
drivers/acpi/bus.c
drivers/acpi/button.c
drivers/acpi/osl.c
drivers/acpi/pci_root.c
drivers/acpi/processor_core.c
drivers/acpi/scan.c
drivers/acpi/sleep/main.c
drivers/acpi/system.c
drivers/acpi/toshiba_acpi.c
drivers/acpi/utilities/utdebug.c
drivers/acpi/utils.c
drivers/acpi/video.c
drivers/misc/acer-wmi.c
drivers/pci/pci-acpi.c

index f688c214be0c67110df1d039be5566d3c7f59bfe..fbcaa069be86678f0a3725f5250f5c662d5e989b 100644 (file)
@@ -283,24 +283,23 @@ config ACPI_TOSHIBA
          If you have a legacy free Toshiba laptop (such as the Libretto L1
          series), say Y.
 
-config ACPI_CUSTOM_DSDT
-       bool "Include Custom DSDT"
+config ACPI_CUSTOM_DSDT_FILE
+       string "Custom DSDT Table file to include"
+       default ""
        depends on !STANDALONE
-       default n 
        help
          This option supports a custom DSDT by linking it into the kernel.
          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
          declaration.
 
+         If unsure, don't enter a file name.
+
+config ACPI_CUSTOM_DSDT
+       bool
+       default ACPI_CUSTOM_DSDT_FILE != ""
+
 config ACPI_CUSTOM_DSDT_INITRD
        bool "Read Custom DSDT from initramfs"
        depends on BLK_DEV_INITRD
index ce3c0a2cbac4dc81e9c5ff2712b100ec8a942b46..5b6760e0f9571d20e34dcb47346c354ad6dff116 100644 (file)
@@ -776,7 +776,7 @@ static int __init acpi_init(void)
 
        acpi_kobj = kobject_create_and_add("acpi", firmware_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;
        }
 
index 24a7865a57cb2515c740fbee5d9b038ca3927630..6c5da83cdb6807be36db10253bd42c2c332c0402 100644 (file)
@@ -449,6 +449,7 @@ static int acpi_button_add(struct acpi_device *device)
        input->phys = button->phys;
        input->id.bustype = BUS_HOST;
        input->id.product = button->type;
+       input->dev.parent = &device->dev;
 
        switch (button->type) {
        case ACPI_BUTTON_TYPE_POWER:
index 8edba7b678eb9d33493f422472dc16fdb4c6f84e..065819ba87c7ee5a6969674d3e654200b35f4da5 100644 (file)
@@ -1237,7 +1237,7 @@ int acpi_check_resource_conflict(struct resource *res)
 
        if (clash) {
                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"
                               " [0x%llx-0x%llx]\n",
                               acpi_enforce_resources == ENFORCE_RESOURCES_LAX
index f14ff1ffab29c24156d2cff92d75340460337745..c3fed31166b552761f2bb9c3b26ef2b7c3e47592 100644 (file)
@@ -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;
        struct acpi_pci_root *root = NULL;
index d9316ab66347c9065e520512581dcf6d6adc6ecf..36a68fa114e3e7b97b85585e40e3f74929110d79 100644 (file)
@@ -888,8 +888,8 @@ int acpi_processor_device_add(acpi_handle handle, struct acpi_device **device)
        return 0;
 }
 
-static void
-acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data)
+static void __ref acpi_processor_hotplug_notify(acpi_handle handle,
+                                               u32 event, void *data)
 {
        struct acpi_processor *pr;
        struct acpi_device *device = NULL;
@@ -899,9 +899,10 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data)
        switch (event) {
        case ACPI_NOTIFY_BUS_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) ?
-                      "ACPI_NOTIFY_BUS_CHECK" : "ACPI_NOTIFY_DEVICE_CHECK");
+                      "ACPI_NOTIFY_BUS_CHECK" : "ACPI_NOTIFY_DEVICE_CHECK"));
 
                if (!is_processor_present(handle))
                        break;
index 3fac011f9cf964082b463ef20913542ca9bce173..b26e3019e1cc8101c3b7a4a869208ff2dec44eb9 100644 (file)
@@ -966,7 +966,7 @@ static void acpi_device_set_id(struct acpi_device *device,
        case ACPI_BUS_TYPE_DEVICE:
                status = acpi_get_object_info(handle, &buffer);
                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;
                }
 
index 293a1cbb47c05776b543894bc32ee145de0153b7..d2f71a54726c5c988bdc680a892599966e0744df 100644 (file)
@@ -504,7 +504,7 @@ static void acpi_power_off_prepare(void)
 static void acpi_power_off(void)
 {
        /* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */
-       printk("%s called\n", __FUNCTION__);
+       printk("%s called\n", __func__);
        local_irq_disable();
        acpi_enable_wakeup_device(ACPI_STATE_S5);
        acpi_enter_sleep_state(ACPI_STATE_S5);
index 55cf4c05bb74edc7714ddb4a000b729395feb291..4749f379a915a4c4f6308f21b21de4205f399387 100644 (file)
@@ -319,7 +319,7 @@ void acpi_irq_stats_init(void)
                goto fail;
 
        for (i = 0; i < num_counters; ++i) {
-               char buffer[10];
+               char buffer[12];
                char *name;
 
                if (i < num_gpes)
index 9e8c20c6a0b7243e708876a4dfffa30dd8f47506..0a43c8e0eff323fe55f29846695c71e750ffedf3 100644 (file)
@@ -99,6 +99,13 @@ MODULE_LICENSE("GPL");
 #define HCI_VIDEO_OUT_CRT              0x2
 #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
  */
 
index c7e128e5369b2d5853acf17e8ff109dc2d1fe021..7361204b1eef2114ca22a65902dae2b6ae75276f 100644 (file)
@@ -109,7 +109,7 @@ void acpi_ut_track_stack_ptr(void)
  * RETURN:      Updated pointer to the function name
  *
  * 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.
  *
  ******************************************************************************/
index eba55b7d6c95ad63479430fc3c63c57dce3a5b19..44ea60cf21c09c00adc1135394decbb4af2faa1d 100644 (file)
@@ -407,6 +407,12 @@ acpi_evaluate_reference(acpi_handle handle,
                        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. */
 
                list->handles[i] = element->reference.handle;
index ace958cb3894f583f3d0abb34893167dd04d501f..1bc0c74f2755d1c3bbf8264c01a27dbd208ce227 100644 (file)
@@ -1201,7 +1201,7 @@ static int acpi_video_bus_ROM_seq_show(struct seq_file *seq, void *offset)
        if (!video)
                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");
 
       end:
index 74d12b4a3abdae48be072857ec75a34c90496dcb..cf71e312b5cb05f45f3eb2165400a922591542a2 100644 (file)
@@ -765,7 +765,7 @@ static struct led_classdev mail_led = {
        .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);
 }
@@ -798,7 +798,7 @@ static struct backlight_ops acer_bl_ops = {
        .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;
 
@@ -817,7 +817,7 @@ static int __init acer_backlight_init(struct device *dev)
        return 0;
 }
 
-static void __exit acer_backlight_exit(void)
+static void acer_backlight_exit(void)
 {
        backlight_device_unregister(acer_backlight_device);
 }
index 4a23654184fc04da02eb1a73468818709fbe6371..72f7476930c857ffa20a4c323dff3af6bf7c9baa 100644 (file)
@@ -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 tmp;
-       static int state_conv[] = {
-               [0] = 0,
-               [1] = 1,
-               [2] = 2,
-               [3] = 3,
-               [4] = 3
+       static const u8 state_conv[] = {
+               [PCI_D0] = ACPI_STATE_D0,
+               [PCI_D1] = ACPI_STATE_D1,
+               [PCI_D2] = ACPI_STATE_D2,
+               [PCI_D3hot] = ACPI_STATE_D3,
+               [PCI_D3cold] = ACPI_STATE_D3
        };
-       int acpi_state = state_conv[(int __force) state];
 
        if (!handle)
                return -ENODEV;
        /* If the ACPI device has _EJ0, ignore the device */
        if (ACPI_SUCCESS(acpi_get_handle(handle, "_EJ0", &tmp)))
                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;
 }