Merge branch 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/ak...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Jul 2008 20:57:37 +0000 (13:57 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Jul 2008 20:57:37 +0000 (13:57 -0700)
* 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-acpi-2.6:
  acpi: fix crash in core ACPI code, triggered by CONFIG_ACPI_PCI_SLOT=y
  ACPI: thinkpad-acpi: don't misdetect in get_thinkpad_model_data() on -ENOMEM
  ACPI: thinkpad-acpi: bump up version to 0.21
  ACPI: thinkpad-acpi: add bluetooth and WWAN rfkill support
  ACPI: thinkpad-acpi: WLSW overrides other rfkill switches
  ACPI: thinkpad-acpi: prepare for bluetooth and wwan rfkill support
  ACPI: thinkpad-acpi: consolidate wlsw notification function
  ACPI: thinkpad-acpi: minor refactor on radio switch init
  Revert "ACPI: don't walk tables if ACPI was disabled"
  Revert "dock: bay: Don't call acpi_walk_namespace() when ACPI is disabled."
  Revert "Fix FADT parsing"
  ACPI : Set FAN device to correct state in boot phase
  ACPI: Ignore _BQC object when registering backlight device
  ACPI: stop complaints about interrupt link End Tags and blank IRQ descriptors

1  2 
drivers/acpi/thermal.c
drivers/acpi/video.c
drivers/misc/Kconfig

diff --combined drivers/acpi/thermal.c
@@@ -769,6 -769,47 +769,47 @@@ static void acpi_thermal_run(unsigned l
                acpi_os_execute(OSL_GPE_HANDLER, acpi_thermal_check, (void *)data);
  }
  
+ static void acpi_thermal_active_off(void *data)
+ {
+       int result = 0;
+       struct acpi_thermal *tz = data;
+       int i = 0;
+       int j = 0;
+       struct acpi_thermal_active *active = NULL;
+       if (!tz) {
+               printk(KERN_ERR PREFIX "Invalid (NULL) context\n");
+               return;
+       }
+       result = acpi_thermal_get_temperature(tz);
+       if (result)
+               return;
+       for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE; i++) {
+               active = &(tz->trips.active[i]);
+               if (!active || !active->flags.valid)
+                       break;
+               if (tz->temperature >= active->temperature) {
+                       /*
+                        * If the thermal temperature is greater than the
+                        * active threshod, unnecessary to turn off the
+                        * the active cooling device.
+                        */
+                       continue;
+               }
+               /*
+                * Below Threshold?
+                * ----------------
+                * Turn OFF all cooling devices associated with this
+                * threshold.
+                */
+               for (j = 0; j < active->devices.count; j++)
+                       result = acpi_bus_set_power(active->devices.handles[j],
+                                                   ACPI_STATE_D3);
+       }
+ }
  static void acpi_thermal_check(void *data)
  {
        int result = 0;
@@@ -1179,8 -1220,8 +1220,8 @@@ static int acpi_thermal_register_therma
  
        tz->tz_enabled = 1;
  
 -      printk(KERN_INFO PREFIX "%s is registered as thermal_zone%d\n",
 -                      tz->device->dev.bus_id, tz->thermal_zone->id);
 +      dev_info(&tz->device->dev, "registered as thermal_zone%d\n",
 +               tz->thermal_zone->id);
        return 0;
  }
  
@@@ -1624,6 -1665,8 +1665,8 @@@ static int acpi_thermal_add(struct acpi
  
        init_timer(&tz->timer);
  
+       acpi_thermal_active_off(tz);
        acpi_thermal_check(tz);
  
        status = acpi_install_notify_handler(device->handle,
diff --combined drivers/acpi/video.c
@@@ -741,7 -741,7 +741,7 @@@ static void acpi_video_device_find_cap(
  
        max_level = acpi_video_init_brightness(device);
  
-       if (device->cap._BCL && device->cap._BCM && device->cap._BQC && max_level > 0){
+       if (device->cap._BCL && device->cap._BCM && max_level > 0) {
                int result;
                static int count = 0;
                char *name;
                device->backlight = backlight_device_register(name,
                        NULL, device, &acpi_backlight_ops);
                device->backlight->props.max_brightness = device->brightness->count-3;
-               device->backlight->props.brightness = acpi_video_get_brightness(device->backlight);
+               /*
+                * If there exists the _BQC object, the _BQC object will be
+                * called to get the current backlight brightness. Otherwise
+                * the brightness will be set to the maximum.
+                */
+               if (device->cap._BQC)
+                       device->backlight->props.brightness =
+                               acpi_video_get_brightness(device->backlight);
+               else
+                       device->backlight->props.brightness =
+                               device->backlight->props.max_brightness;
                backlight_update_status(device->backlight);
                kfree(name);
  
                if (IS_ERR(device->cdev))
                        return;
  
 -              printk(KERN_INFO PREFIX
 -                      "%s is registered as cooling_device%d\n",
 -                      device->dev->dev.bus_id, device->cdev->id);
 +              dev_info(&device->dev->dev, "registered as cooling_device%d\n",
 +                       device->cdev->id);
                result = sysfs_create_link(&device->dev->dev.kobj,
                                &device->cdev->device.kobj,
                                "thermal_cooling");
diff --combined drivers/misc/Kconfig
@@@ -279,6 -279,8 +279,8 @@@ config THINKPAD_ACP
        select INPUT
        select NEW_LEDS
        select LEDS_CLASS
+       select NET
+       select RFKILL
        ---help---
          This is a driver for the IBM and Lenovo ThinkPad laptops. It adds
          support for Fn-Fx key combinations, Bluetooth control, video
@@@ -420,17 -422,4 +422,17 @@@ config SGI_X
          this feature will allow for direct communication between SSIs
          based on a network adapter and DMA messaging.
  
 +config HP_ILO
 +      tristate "Channel interface driver for HP iLO/iLO2 processor"
 +      default n
 +      help
 +        The channel interface driver allows applications to communicate
 +        with iLO/iLO2 management processors present on HP ProLiant
 +        servers.  Upon loading, the driver creates /dev/hpilo/dXccbN files,
 +        which can be used to gather data from the management processor,
 +        via read and write system calls.
 +
 +        To compile this driver as a module, choose M here: the
 +        module will be called hpilo.
 +
  endif # MISC_DEVICES