]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branches 'release', 'acpica', 'bugzilla-10224', 'bugzilla-9772', 'bugzilla...
authorLen Brown <len.brown@intel.com>
Wed, 30 Apr 2008 17:58:00 +0000 (13:58 -0400)
committerLen Brown <len.brown@intel.com>
Wed, 30 Apr 2008 17:58:00 +0000 (13:58 -0400)
1  2  3  4  5  6  7  8  9  10  11  12  13 
arch/mips/au1000/common/power.c
arch/x86/kernel/apm_32.c
drivers/acpi/events/evgpe.c
drivers/acpi/processor_idle.c
drivers/acpi/scan.c
drivers/acpi/utilities/utxface.c
drivers/acpi/video.c
drivers/misc/Kconfig
drivers/misc/thinkpad_acpi.c

index 54047d69b820c98195dfa534748019414d8e76ea,54047d69b820c98195dfa534748019414d8e76ea,812a5f8b7d2672ac4cab47eaa4583653d44b7da9,54047d69b820c98195dfa534748019414d8e76ea,54047d69b820c98195dfa534748019414d8e76ea,812a5f8b7d2672ac4cab47eaa4583653d44b7da9,54047d69b820c98195dfa534748019414d8e76ea,812a5f8b7d2672ac4cab47eaa4583653d44b7da9,725a52f364b0042cf794357a603e36e27eb286c9,54047d69b820c98195dfa534748019414d8e76ea,812a5f8b7d2672ac4cab47eaa4583653d44b7da9,812a5f8b7d2672ac4cab47eaa4583653d44b7da9,812a5f8b7d2672ac4cab47eaa4583653d44b7da9..a8cd2c1b9e1b59f313ae98a0c6e8579e0afc6dca
@@@@@@@@@@@@@@ -278,36 -278,36 -271,36 -278,36 -278,36 -271,36 -278,36 -271,36 -277,12 -278,36 -271,36 -271,36 -271,36 +270,12 @@@@@@@@@@@@@@ static int pm_do_sleep(ctl_table * ctl
                        p = buf;
                        sleep_ticks = simple_strtoul(p, &p, 0);
             #endif
-------- ----           retval = pm_send_all(PM_SUSPEND, (void *) 2);
-------- ----
-------- ----           if (retval)
-------- ----                   return retval;
             
                        au_sleep();
-- -- -  -              retval = pm_send_all(PM_RESUME, (void *) 0);
-- -- -  -      }
-- -- -  -      return retval;
-- -- -  -   }
-- -- -  -   
-- -- -  -   static int pm_do_suspend(ctl_table * ctl, int write, struct file *file,
-- -- -  -                       void __user *buffer, size_t * len, loff_t *ppos)
-- -- -  -   {
-- -- -  -      int retval = 0;
-- -- -  -   
-- -- -  -      if (!write) {
-- -- -  -              *len = 0;
-- -- -  -      } else {
-- -- -  -              retval = pm_send_all(PM_SUSPEND, (void *) 2);
-- -- -  -              if (retval)
-- -- -  -                      return retval;
-- -- -  -              suspend_mode = 1;
-- -- -  -   
-------- ----           retval = pm_send_all(PM_RESUME, (void *) 0);
                }
  -  - -  ---   return retval;
  -  - -  ---}
  -  - -  ---
  -  - -  ---static int pm_do_suspend(ctl_table * ctl, int write, struct file *file,
  -  - -  ---                    void __user *buffer, size_t * len, loff_t *ppos)
  -  - -  ---{
  -  - -  ---   int retval = 0;
  -  - -  ---
  -  - -  ---   if (!write) {
  -  - -  ---           *len = 0;
  -  - -  ---   } else {
  -  - -  ---           retval = pm_send_all(PM_SUSPEND, (void *) 2);
  -  - -  ---           if (retval)
  -  - -  ---                   return retval;
  -  - -  ---           suspend_mode = 1;
  -  - -  ---
  -  - -  ---           retval = pm_send_all(PM_RESUME, (void *) 0);
  -  - -  ---   }
-------- ----   return retval;
++++++++ ++++   return 0;
             }
             
-------- ----
             static int pm_do_freq(ctl_table * ctl, int write, struct file *file,
                              void __user *buffer, size_t * len, loff_t *ppos)
             {
Simple merge
Simple merge
index 788da9781f80ffb5311b396cd3557b0786376dcd,788da9781f80ffb5311b396cd3557b0786376dcd,0d90ff5fd1172440b724f161b1ad51657511eb3a,788da9781f80ffb5311b396cd3557b0786376dcd,e8e2d88692368f5ea4903485aa7ca6a6b783e493,0d90ff5fd1172440b724f161b1ad51657511eb3a,47b167c731a04764dda30a33b38fd55c81e3c0cc,0d90ff5fd1172440b724f161b1ad51657511eb3a,788da9781f80ffb5311b396cd3557b0786376dcd,6f3b217699e94a4d47f5b3863c4ffe68ff24938f,0d90ff5fd1172440b724f161b1ad51657511eb3a,0d90ff5fd1172440b724f161b1ad51657511eb3a,0d90ff5fd1172440b724f161b1ad51657511eb3a..55d69dce47c4e2da1090a80ab7c36235a5c9ded8
@@@@@@@@@@@@@@ -418,14 -418,14 -418,13 -418,14 -418,14 -418,13 -418,14 -418,13 -418,14 -416,12 -418,13 -418,13 -418,13 +418,13 @@@@@@@@@@@@@@ static void acpi_processor_idle(void
             
                cx = pr->power.state;
                if (!cx || acpi_idle_suspend) {
-- -- - --              if (pm_idle_save)
-- -- - --                      pm_idle_save();
-- -- - --              else
++ ++ + ++              if (pm_idle_save) {
++ ++ + ++                      pm_idle_save(); /* enables IRQs */
++ ++ + ++              } else {
                                acpi_safe_halt();
-- -- - -    
-- -- - -               if (irqs_disabled())
         +                      local_irq_enable();
++ ++ + ++              }
             
         -              local_irq_enable();
                        return;
                }
             
                         *       skew otherwise.
                         */
                        sleep_ticks = 0xFFFFFFFF;
-- -- - -               if (irqs_disabled())
-- -- - -                       local_irq_enable();
         -              local_irq_enable();
         +   
                        break;
             
                case ACPI_STATE_C2:
Simple merge
Simple merge
index 980a74188781eba10b5372934de94bef0e2a2ea2,980a74188781eba10b5372934de94bef0e2a2ea2,980a74188781eba10b5372934de94bef0e2a2ea2,980a74188781eba10b5372934de94bef0e2a2ea2,12fb44f16766f5979be78b031cd16225161e23d3,980a74188781eba10b5372934de94bef0e2a2ea2,980a74188781eba10b5372934de94bef0e2a2ea2,980a74188781eba10b5372934de94bef0e2a2ea2,980a74188781eba10b5372934de94bef0e2a2ea2,12cce69b5441e98a7bd8da23031dc250daaa88f1,55c09561937910ebfbd50fb922d0444881fb617c,980a74188781eba10b5372934de94bef0e2a2ea2,c24a1d743257e835523d2ac25e9e2474ee421df1..33c502e560269e0678ab726508f36f13de9c6a6d
@@@@@@@@@@@@@@ -1337,79 -1337,79 -1337,79 -1337,79 -1337,79 -1337,79 -1337,79 -1337,79 -1337,79 -1366,108 -1335,79 -1337,79 -1338,79 +1336,79 @@@@@@@@@@@@@@ acpi_video_bus_write_DOS(struct file *f
             
             static int acpi_video_bus_add_fs(struct acpi_device *device)
             {
         -      long device_id;
         -      int status;
------------    struct proc_dir_entry *entry = NULL;
------------    struct acpi_video_bus *video;
--------- -- 
         -      struct device *dev;
++++++++++++    struct acpi_video_bus *video = acpi_driver_data(device);
++++++++++++    struct proc_dir_entry *device_dir;
++++++++++++    struct proc_dir_entry *entry;
             
--------- --    video = acpi_driver_data(device);
         -      status =
         -          acpi_evaluate_integer(device->handle, "_ADR", NULL, &device_id);
++++++++++++    device_dir = proc_mkdir(acpi_device_bid(device), acpi_video_dir);
++++++++++++    if (!device_dir)
++++++++++++            return -ENOMEM;
             
         -      if (!ACPI_SUCCESS(status))
         -              return -ENODEV;
         -   
         -      /* We need to attempt to determine whether the _ADR refers to a
         -         PCI device or not. There's no terribly good way to do this,
         -         so the best we can hope for is to assume that there'll never
         -         be a video device in the host bridge */
         -      if (device_id >= 0x10000) {
         -              /* It looks like a PCI device. Does it exist? */
         -              dev = acpi_get_physical_device(device->handle);
         -      } else {
         -              /* It doesn't look like a PCI device. Does its parent
         -                 exist? */
         -              acpi_handle phandle;
         -              if (acpi_get_parent(device->handle, &phandle))
         -                      return -ENODEV;
         -              dev = acpi_get_physical_device(phandle);
         -      }
         -      if (!dev)
         -              return -ENODEV;
         -      put_device(dev);
         -   
         -   
         -   
         -      video = acpi_driver_data(device);
         -   
------------    if (!acpi_device_dir(device)) {
------------            acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device),
------------                                                 acpi_video_dir);
------------            if (!acpi_device_dir(device))
------------                    return -ENODEV;
------------            video->dir = acpi_device_dir(device);
------------            acpi_device_dir(device)->owner = THIS_MODULE;
------------    }
++++++++++++    device_dir->owner = THIS_MODULE;
             
                /* 'info' [R] */
------------    entry = create_proc_entry("info", S_IRUGO, acpi_device_dir(device));
++++++++++++    entry = create_proc_entry("info", S_IRUGO, device_dir);
                if (!entry)
------------            return -ENODEV;
------------    else {
------------            entry->proc_fops = &acpi_video_bus_info_fops;
------------            entry->data = acpi_driver_data(device);
------------            entry->owner = THIS_MODULE;
------------    }
++++++++++++            goto err_remove_dir;
++++++++++++ 
++++++++++++    entry->proc_fops = &acpi_video_bus_info_fops;
++++++++++++    entry->data = acpi_driver_data(device);
++++++++++++    entry->owner = THIS_MODULE;
             
                /* 'ROM' [R] */
------------    entry = create_proc_entry("ROM", S_IRUGO, acpi_device_dir(device));
++++++++++++    entry = create_proc_entry("ROM", S_IRUGO, device_dir);
                if (!entry)
------------            return -ENODEV;
------------    else {
------------            entry->proc_fops = &acpi_video_bus_ROM_fops;
------------            entry->data = acpi_driver_data(device);
------------            entry->owner = THIS_MODULE;
------------    }
++++++++++++            goto err_remove_info;
++++++++++++ 
++++++++++++    entry->proc_fops = &acpi_video_bus_ROM_fops;
++++++++++++    entry->data = acpi_driver_data(device);
++++++++++++    entry->owner = THIS_MODULE;
             
                /* 'POST_info' [R] */
------------    entry =
------------        create_proc_entry("POST_info", S_IRUGO, acpi_device_dir(device));
++++++++++++    entry = create_proc_entry("POST_info", S_IRUGO, device_dir);
                if (!entry)
------------            return -ENODEV;
------------    else {
------------            entry->proc_fops = &acpi_video_bus_POST_info_fops;
------------            entry->data = acpi_driver_data(device);
------------            entry->owner = THIS_MODULE;
------------    }
++++++++++++            goto err_remove_rom;
++++++++++++ 
++++++++++++    entry->proc_fops = &acpi_video_bus_POST_info_fops;
++++++++++++    entry->data = acpi_driver_data(device);
++++++++++++    entry->owner = THIS_MODULE;
             
                /* 'POST' [R/W] */
------------    entry =
------------        create_proc_entry("POST", S_IFREG | S_IRUGO | S_IRUSR,
------------                          acpi_device_dir(device));
++++++++++++    entry = create_proc_entry("POST", S_IFREG | S_IRUGO | S_IWUSR,
++++++++++++                              device_dir);
                if (!entry)
------------            return -ENODEV;
------------    else {
------------            acpi_video_bus_POST_fops.write = acpi_video_bus_write_POST;
------------            entry->proc_fops = &acpi_video_bus_POST_fops;
------------            entry->data = acpi_driver_data(device);
------------            entry->owner = THIS_MODULE;
------------    }
++++++++++++            goto err_remove_post_info;
++++++++++++ 
++++++++++++    acpi_video_bus_POST_fops.write = acpi_video_bus_write_POST;
++++++++++++    entry->proc_fops = &acpi_video_bus_POST_fops;
++++++++++++    entry->data = acpi_driver_data(device);
++++++++++++    entry->owner = THIS_MODULE;
             
                /* 'DOS' [R/W] */
------------    entry =
------------        create_proc_entry("DOS", S_IFREG | S_IRUGO | S_IRUSR,
------------                          acpi_device_dir(device));
++++++++++++    entry = create_proc_entry("DOS", S_IFREG | S_IRUGO | S_IWUSR,
++++++++++++                          device_dir);
                if (!entry)
------------            return -ENODEV;
------------    else {
------------            acpi_video_bus_DOS_fops.write = acpi_video_bus_write_DOS;
------------            entry->proc_fops = &acpi_video_bus_DOS_fops;
------------            entry->data = acpi_driver_data(device);
------------            entry->owner = THIS_MODULE;
------------    }
++++++++++++            goto err_remove_post;
++++++++++ + 
++++++++++++    acpi_video_bus_DOS_fops.write = acpi_video_bus_write_DOS;
++++++++++++    entry->proc_fops = &acpi_video_bus_DOS_fops;
++++++++++++    entry->data = acpi_driver_data(device);
++++++++++++    entry->owner = THIS_MODULE;
          +  
++++++++++++    video->dir = acpi_device_dir(device) = device_dir;
                return 0;
++++++++++++ 
++++++++++++  err_remove_post:
++++++++++++    remove_proc_entry("POST", device_dir);
++++++++++++  err_remove_post_info:
++++++++++++    remove_proc_entry("POST_info", device_dir);
++++++++++++  err_remove_rom:
++++++++++++    remove_proc_entry("ROM", device_dir);
++++++++++++  err_remove_info:
++++++++++++    remove_proc_entry("info", device_dir);
++++++++++++  err_remove_dir:
++++++++++++    remove_proc_entry(acpi_device_bid(device), acpi_video_dir);
++++++++++++    return -ENOMEM;
             }
             
             static int acpi_video_bus_remove_fs(struct acpi_device *device)
index 962817e49fba02e063dc164a3d0971e221eaa3a7,962817e49fba02e063dc164a3d0971e221eaa3a7,297a48f8544679dda2af4bd435cb32feff65b661,297a48f8544679dda2af4bd435cb32feff65b661,962817e49fba02e063dc164a3d0971e221eaa3a7,7a4869a9db868939deb741c6be64135c7c2bacae,962817e49fba02e063dc164a3d0971e221eaa3a7,38cce4d1e2fbf11991faacea848cc0c267174429,962817e49fba02e063dc164a3d0971e221eaa3a7,982e27b86d101a15ebb2f579652a67d4ae08f806,08f35d76dcd9003960c395f59e6aafe5f919b55e,2e217947d971529f1e4afb5ffc78f1af996a4cba,297a48f8544679dda2af4bd435cb32feff65b661..636af2862308fab614b4f9f9b2395ce0a24c7e4f
@@@@@@@@@@@@@@ -107,8 -107,8 -140,8 -140,8 -107,8 -140,8 -107,8 -140,9 -107,8 -107,7 -140,8 -140,8 -140,8 +140,9 @@@@@@@@@@@@@@ config ACER_WM
                depends on EXPERIMENTAL
                depends on ACPI
                depends on LEDS_CLASS
+++++++ +++++   depends on NEW_LEDS
                depends on BACKLIGHT_CLASS_DEVICE
         +      depends on SERIO_I8042
                select ACPI_WMI
                ---help---
                  This is a driver for newer Acer (and Wistron) laptops. It adds
index 6cb781262f947611a20916bf6b996c9ff3e713cb,6cb781262f947611a20916bf6b996c9ff3e713cb,6cb781262f947611a20916bf6b996c9ff3e713cb,6cb781262f947611a20916bf6b996c9ff3e713cb,6cb781262f947611a20916bf6b996c9ff3e713cb,6cb781262f947611a20916bf6b996c9ff3e713cb,6cb781262f947611a20916bf6b996c9ff3e713cb,31115c9cfb345154b8a5c7d90027940a0111b7c4,6cb781262f947611a20916bf6b996c9ff3e713cb,bb269d0c677edbc4cadd268dc634e90b6120a80e,6cb781262f947611a20916bf6b996c9ff3e713cb,d29ad2e4afc23a73a083c2ea5c8fc7b96af64001,6cb781262f947611a20916bf6b996c9ff3e713cb..3f28f6eabdbffcca3868b0b688b4a0516da91347
@@@@@@@@@@@@@@ -4266,106 -4266,106 -4266,106 -4266,106 -4266,106 -4266,106 -4266,106 -4266,106 -4266,106 -4265,106 -4266,106 -4697,23 -4266,106 +4697,23 @@@@@@@@@@@@@@ static int brightness_update_status(str
                                        bd->props.brightness : 0);
             }
             
----------- -static struct backlight_ops ibm_backlight_data = {
----------- -   .get_brightness = brightness_get,
----------- -   .update_status  = brightness_update_status,
----------- -};
----------- -
----------- -/* --------------------------------------------------------------------- */
----------- -
----------- -static int __init tpacpi_query_bcll_levels(acpi_handle handle)
----------- -{
----------- -   struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
----------- -   union acpi_object *obj;
----------- -   int rc;
----------- -
----------- -   if (ACPI_SUCCESS(acpi_evaluate_object(handle, NULL, NULL, &buffer))) {
----------- -           obj = (union acpi_object *)buffer.pointer;
----------- -           if (!obj || (obj->type != ACPI_TYPE_PACKAGE)) {
----------- -                   printk(TPACPI_ERR "Unknown BCLL data, "
----------- -                          "please report this to %s\n", TPACPI_MAIL);
----------- -                   rc = 0;
----------- -           } else {
----------- -                   rc = obj->package.count;
----------- -           }
----------- -   } else {
----------- -           return 0;
----------- -   }
----------- -
----------- -   kfree(buffer.pointer);
----------- -   return rc;
----------- -}
----------- -
----------- -static acpi_status __init brightness_find_bcll(acpi_handle handle, u32 lvl,
----------- -                                   void *context, void **rv)
--------- - -{
--------- - -   char name[ACPI_PATH_SEGMENT_LENGTH];
--------- - -   struct acpi_buffer buffer = { sizeof(name), &name };
--------- - -
--------- - -   if (ACPI_SUCCESS(acpi_get_name(handle, ACPI_SINGLE_NAME, &buffer)) &&
--------- - -       !strncmp("BCLL", name, sizeof(name) - 1)) {
--------- - -           if (tpacpi_query_bcll_levels(handle) == 16) {
--------- - -                   *rv = handle;
--------- - -                   return AE_CTRL_TERMINATE;
--------- - -           } else {
--------- - -                   return AE_OK;
--------- - -           }
--------- - -   } else {
--------- - -           return AE_OK;
--------- - -   }
--------- - -}
--------- - -
--------- - -static int __init brightness_check_levels(void)
+++++++++++ +static int brightness_get(struct backlight_device *bd)
             {
--------- - -   int status;
--------- - -   void *found_node = NULL;
         -      char name[ACPI_PATH_SEGMENT_LENGTH];
         -      struct acpi_buffer buffer = { sizeof(name), &name };
+++++++++++ +   int status, res;
             
         -      if (ACPI_SUCCESS(acpi_get_name(handle, ACPI_SINGLE_NAME, &buffer)) &&
         -          !strncmp("BCLL", name, sizeof(name) - 1)) {
         -              if (tpacpi_query_bcll_levels(handle) == 16) {
         -                      *rv = handle;
         -                      return AE_CTRL_TERMINATE;
         -              } else {
         -                      return AE_OK;
         -              }
         -      } else {
         -              return AE_OK;
         -      }
         -   }
         -   
         -   static int __init brightness_check_levels(void)
         -   {
         -      int status;
         -      void *found_node = NULL;
         -   
----------- -   if (!vid_handle) {
----------- -           TPACPI_ACPIHANDLE_INIT(vid);
----------- -   }
----------- -   if (!vid_handle)
----------- -           return 0;
----------- -
----------- -   /* Search for a BCLL package with 16 levels */
----------- -   status = acpi_walk_namespace(ACPI_TYPE_PACKAGE, vid_handle, 3,
----------- -                                   brightness_find_bcll, NULL,
----------- -                                   &found_node);
----------- -
----------- -   return (ACPI_SUCCESS(status) && found_node != NULL);
----------- -}
----------- -
----------- -static acpi_status __init brightness_find_bcl(acpi_handle handle, u32 lvl,
----------- -                                   void *context, void **rv)
----------- -{
----------- -   char name[ACPI_PATH_SEGMENT_LENGTH];
----------- -   struct acpi_buffer buffer = { sizeof(name), &name };
+++++++++++ +   res = brightness_get_raw(&status);
+++++++++++ +   if (res < 0)
+++++++++++ +           return 0; /* FIXME: teach backlight about error handling */
             
----------- -   if (ACPI_SUCCESS(acpi_get_name(handle, ACPI_SINGLE_NAME, &buffer)) &&
----------- -       !strncmp("_BCL", name, sizeof(name) - 1)) {
----------- -           *rv = handle;
----------- -           return AE_CTRL_TERMINATE;
----------- -   } else {
----------- -           return AE_OK;
----------- -   }
+++++++++++ +   return status & TP_EC_BACKLIGHT_LVLMSK;
             }
             
----------- -static int __init brightness_check_std_acpi_support(void)
----------- -{
----------- -   int status;
----------- -   void *found_node = NULL;
----------- -
----------- -   if (!vid_handle) {
----------- -           TPACPI_ACPIHANDLE_INIT(vid);
----------- -   }
----------- -   if (!vid_handle)
----------- -           return 0;
----------- -
----------- -   /* Search for a _BCL method, but don't execute it */
----------- -   status = acpi_walk_namespace(ACPI_TYPE_METHOD, vid_handle, 3,
----------- -                                brightness_find_bcl, NULL, &found_node);
+++++++++++ +static struct backlight_ops ibm_backlight_data = {
+++++++++++ +   .get_brightness = brightness_get,
+++++++++++ +   .update_status  = brightness_update_status,
+++++++++++ +};
             
----------- -   return (ACPI_SUCCESS(status) && found_node != NULL);
----------- -}
+++++++++++ +/* --------------------------------------------------------------------- */
             
             static int __init brightness_init(struct ibm_init_struct *iibm)
             {