aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/kernel-parameters.txt2
-rw-r--r--arch/x86/kernel/acpi/boot.c4
-rw-r--r--arch/x86/kernel/acpi/sleep.c4
-rw-r--r--drivers/acpi/Kconfig4
-rw-r--r--drivers/acpi/ac.c2
-rw-r--r--drivers/acpi/acpi_memhotplug.c2
-rw-r--r--drivers/acpi/asus_acpi.c4
-rw-r--r--drivers/acpi/battery.c2
-rw-r--r--drivers/acpi/button.c2
-rw-r--r--drivers/acpi/container.c2
-rw-r--r--drivers/acpi/ec.c4
-rw-r--r--drivers/acpi/fan.c2
-rw-r--r--drivers/acpi/pci_link.c2
-rw-r--r--drivers/acpi/pci_root.c2
-rw-r--r--drivers/acpi/power.c4
-rw-r--r--drivers/acpi/processor_core.c2
-rw-r--r--drivers/acpi/sbs.c2
-rw-r--r--drivers/acpi/sbshc.c4
-rw-r--r--drivers/acpi/scan.c4
-rw-r--r--drivers/acpi/sleep/main.c7
-rw-r--r--drivers/acpi/thermal.c10
-rw-r--r--drivers/acpi/toshiba_acpi.c2
-rw-r--r--drivers/acpi/video.c6
-rw-r--r--drivers/misc/asus-laptop.c5
-rw-r--r--drivers/misc/eeepc-laptop.c2
-rw-r--r--drivers/misc/fujitsu-laptop.c4
-rw-r--r--drivers/misc/intel_menlow.c2
-rw-r--r--drivers/misc/sony-laptop.c2
-rw-r--r--drivers/misc/thinkpad_acpi.c2
-rw-r--r--include/acpi/acpi_bus.h6
30 files changed, 56 insertions, 46 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 99cf83fd6947..5d1526cb9cc7 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -2173,7 +2173,7 @@ and is between 256 and 4096 characters. It is defined in the file
2173 2173
2174 thermal.crt= [HW,ACPI] 2174 thermal.crt= [HW,ACPI]
2175 -1: disable all critical trip points in all thermal zones 2175 -1: disable all critical trip points in all thermal zones
2176 <degrees C>: lower all critical trip points 2176 <degrees C>: override all critical trip points
2177 2177
2178 thermal.nocrt= [HW,ACPI] 2178 thermal.nocrt= [HW,ACPI]
2179 Set to disable actions on ACPI thermal zone 2179 Set to disable actions on ACPI thermal zone
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index c102af85df9c..0c2742f8c4da 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -97,7 +97,6 @@ static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
97#warning ACPI uses CMPXCHG, i486 and later hardware 97#warning ACPI uses CMPXCHG, i486 and later hardware
98#endif 98#endif
99 99
100static int acpi_mcfg_64bit_base_addr __initdata = FALSE;
101 100
102/* -------------------------------------------------------------------------- 101/* --------------------------------------------------------------------------
103 Boot-time Configuration 102 Boot-time Configuration
@@ -156,6 +155,9 @@ char *__init __acpi_map_table(unsigned long phys, unsigned long size)
156} 155}
157 156
158#ifdef CONFIG_PCI_MMCONFIG 157#ifdef CONFIG_PCI_MMCONFIG
158
159static int acpi_mcfg_64bit_base_addr __initdata = FALSE;
160
159/* The physical address of the MMCONFIG aperture. Set from ACPI tables. */ 161/* The physical address of the MMCONFIG aperture. Set from ACPI tables. */
160struct acpi_mcfg_allocation *pci_mmcfg_config; 162struct acpi_mcfg_allocation *pci_mmcfg_config;
161int pci_mmcfg_config_num; 163int pci_mmcfg_config_num;
diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c
index 426e5d91b63a..55d10cbe65b1 100644
--- a/arch/x86/kernel/acpi/sleep.c
+++ b/arch/x86/kernel/acpi/sleep.c
@@ -21,7 +21,7 @@ unsigned long acpi_realmode_flags;
21static unsigned long acpi_realmode; 21static unsigned long acpi_realmode;
22 22
23#if defined(CONFIG_SMP) && defined(CONFIG_64BIT) 23#if defined(CONFIG_SMP) && defined(CONFIG_64BIT)
24static char temp_stack[10240]; 24static char temp_stack[4096];
25#endif 25#endif
26 26
27/** 27/**
@@ -97,7 +97,7 @@ int acpi_save_state_mem(void)
97#else /* CONFIG_64BIT */ 97#else /* CONFIG_64BIT */
98 header->trampoline_segment = setup_trampoline() >> 4; 98 header->trampoline_segment = setup_trampoline() >> 4;
99#ifdef CONFIG_SMP 99#ifdef CONFIG_SMP
100 stack_start.sp = temp_stack + 4096; 100 stack_start.sp = temp_stack + sizeof(temp_stack);
101#endif 101#endif
102 initial_code = (unsigned long)wakeup_long64; 102 initial_code = (unsigned long)wakeup_long64;
103 saved_magic = 0x123456789abcdef0; 103 saved_magic = 0x123456789abcdef0;
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index 3919d6dbe06f..cbfc58d60236 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -42,7 +42,7 @@ if ACPI
42 42
43config ACPI_SLEEP 43config ACPI_SLEEP
44 bool 44 bool
45 depends on PM_SLEEP 45 depends on SUSPEND || HIBERNATION
46 default y 46 default y
47 47
48config ACPI_PROCFS 48config ACPI_PROCFS
@@ -252,7 +252,7 @@ config ACPI_ASUS
252 252
253config ACPI_TOSHIBA 253config ACPI_TOSHIBA
254 tristate "Toshiba Laptop Extras" 254 tristate "Toshiba Laptop Extras"
255 depends on X86 255 depends on X86 && INPUT
256 select BACKLIGHT_CLASS_DEVICE 256 select BACKLIGHT_CLASS_DEVICE
257 ---help--- 257 ---help---
258 This driver adds support for access to certain system settings 258 This driver adds support for access to certain system settings
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
index 831883b7d6c9..8b6a84a43b15 100644
--- a/drivers/acpi/ac.c
+++ b/drivers/acpi/ac.c
@@ -269,7 +269,7 @@ static int acpi_ac_add(struct acpi_device *device)
269 ac->device = device; 269 ac->device = device;
270 strcpy(acpi_device_name(device), ACPI_AC_DEVICE_NAME); 270 strcpy(acpi_device_name(device), ACPI_AC_DEVICE_NAME);
271 strcpy(acpi_device_class(device), ACPI_AC_CLASS); 271 strcpy(acpi_device_class(device), ACPI_AC_CLASS);
272 acpi_driver_data(device) = ac; 272 device->driver_data = ac;
273 273
274 result = acpi_ac_get_state(ac); 274 result = acpi_ac_get_state(ac);
275 if (result) 275 if (result)
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
index bbad9b6c2c88..289d02260f16 100644
--- a/drivers/acpi/acpi_memhotplug.c
+++ b/drivers/acpi/acpi_memhotplug.c
@@ -403,7 +403,7 @@ static int acpi_memory_device_add(struct acpi_device *device)
403 mem_device->device = device; 403 mem_device->device = device;
404 sprintf(acpi_device_name(device), "%s", ACPI_MEMORY_DEVICE_NAME); 404 sprintf(acpi_device_name(device), "%s", ACPI_MEMORY_DEVICE_NAME);
405 sprintf(acpi_device_class(device), "%s", ACPI_MEMORY_DEVICE_CLASS); 405 sprintf(acpi_device_class(device), "%s", ACPI_MEMORY_DEVICE_CLASS);
406 acpi_driver_data(device) = mem_device; 406 device->driver_data = mem_device;
407 407
408 /* Get the range from the _CRS */ 408 /* Get the range from the _CRS */
409 result = acpi_memory_get_device_resources(mem_device); 409 result = acpi_memory_get_device_resources(mem_device);
diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c
index 3f7adf683d4e..2377e8b917d7 100644
--- a/drivers/acpi/asus_acpi.c
+++ b/drivers/acpi/asus_acpi.c
@@ -1244,6 +1244,8 @@ static int asus_hotk_get_info(void)
1244 "default values\n", string); 1244 "default values\n", string);
1245 printk(KERN_NOTICE 1245 printk(KERN_NOTICE
1246 " send /proc/acpi/dsdt to the developers\n"); 1246 " send /proc/acpi/dsdt to the developers\n");
1247 kfree(model);
1248 return -ENODEV;
1247 } 1249 }
1248 hotk->methods = &model_conf[hotk->model]; 1250 hotk->methods = &model_conf[hotk->model];
1249 return AE_OK; 1251 return AE_OK;
@@ -1321,7 +1323,7 @@ static int asus_hotk_add(struct acpi_device *device)
1321 hotk->handle = device->handle; 1323 hotk->handle = device->handle;
1322 strcpy(acpi_device_name(device), ACPI_HOTK_DEVICE_NAME); 1324 strcpy(acpi_device_name(device), ACPI_HOTK_DEVICE_NAME);
1323 strcpy(acpi_device_class(device), ACPI_HOTK_CLASS); 1325 strcpy(acpi_device_class(device), ACPI_HOTK_CLASS);
1324 acpi_driver_data(device) = hotk; 1326 device->driver_data = hotk;
1325 hotk->device = device; 1327 hotk->device = device;
1326 1328
1327 result = asus_hotk_check(); 1329 result = asus_hotk_check();
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index b1c723f9f58d..de8046933bce 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -804,7 +804,7 @@ static int acpi_battery_add(struct acpi_device *device)
804 battery->device = device; 804 battery->device = device;
805 strcpy(acpi_device_name(device), ACPI_BATTERY_DEVICE_NAME); 805 strcpy(acpi_device_name(device), ACPI_BATTERY_DEVICE_NAME);
806 strcpy(acpi_device_class(device), ACPI_BATTERY_CLASS); 806 strcpy(acpi_device_class(device), ACPI_BATTERY_CLASS);
807 acpi_driver_data(device) = battery; 807 device->driver_data = battery;
808 mutex_init(&battery->lock); 808 mutex_init(&battery->lock);
809 acpi_battery_update(battery); 809 acpi_battery_update(battery);
810#ifdef CONFIG_ACPI_PROCFS_POWER 810#ifdef CONFIG_ACPI_PROCFS_POWER
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index 1dfec413588c..e22033ea2614 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -384,7 +384,7 @@ static int acpi_button_add(struct acpi_device *device)
384 return -ENOMEM; 384 return -ENOMEM;
385 385
386 button->device = device; 386 button->device = device;
387 acpi_driver_data(device) = button; 387 device->driver_data = button;
388 388
389 button->input = input = input_allocate_device(); 389 button->input = input = input_allocate_device();
390 if (!input) { 390 if (!input) {
diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c
index 3c25ec7a1871..03ea8478e393 100644
--- a/drivers/acpi/container.c
+++ b/drivers/acpi/container.c
@@ -108,7 +108,7 @@ static int acpi_container_add(struct acpi_device *device)
108 container->handle = device->handle; 108 container->handle = device->handle;
109 strcpy(acpi_device_name(device), ACPI_CONTAINER_DEVICE_NAME); 109 strcpy(acpi_device_name(device), ACPI_CONTAINER_DEVICE_NAME);
110 strcpy(acpi_device_class(device), ACPI_CONTAINER_CLASS); 110 strcpy(acpi_device_class(device), ACPI_CONTAINER_CLASS);
111 acpi_driver_data(device) = container; 111 device->driver_data = container;
112 112
113 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device <%s> bid <%s>\n", 113 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device <%s> bid <%s>\n",
114 acpi_device_name(device), acpi_device_bid(device))); 114 acpi_device_name(device), acpi_device_bid(device)));
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 4178d17aa0ed..40fefba6264e 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -799,7 +799,7 @@ static int acpi_ec_add(struct acpi_device *device)
799 799
800 if (!first_ec) 800 if (!first_ec)
801 first_ec = ec; 801 first_ec = ec;
802 acpi_driver_data(device) = ec; 802 device->driver_data = ec;
803 acpi_ec_add_fs(device); 803 acpi_ec_add_fs(device);
804 pr_info(PREFIX "GPE = 0x%lx, I/O: command/status = 0x%lx, data = 0x%lx\n", 804 pr_info(PREFIX "GPE = 0x%lx, I/O: command/status = 0x%lx, data = 0x%lx\n",
805 ec->gpe, ec->command_addr, ec->data_addr); 805 ec->gpe, ec->command_addr, ec->data_addr);
@@ -824,7 +824,7 @@ static int acpi_ec_remove(struct acpi_device *device, int type)
824 } 824 }
825 mutex_unlock(&ec->lock); 825 mutex_unlock(&ec->lock);
826 acpi_ec_remove_fs(device); 826 acpi_ec_remove_fs(device);
827 acpi_driver_data(device) = NULL; 827 device->driver_data = NULL;
828 if (ec == first_ec) 828 if (ec == first_ec)
829 first_ec = NULL; 829 first_ec = NULL;
830 kfree(ec); 830 kfree(ec);
diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c
index dfc0486ffaff..60d54d1f6b19 100644
--- a/drivers/acpi/fan.c
+++ b/drivers/acpi/fan.c
@@ -265,7 +265,7 @@ static int acpi_fan_add(struct acpi_device *device)
265 265
266 dev_info(&device->dev, "registered as cooling_device%d\n", cdev->id); 266 dev_info(&device->dev, "registered as cooling_device%d\n", cdev->id);
267 267
268 acpi_driver_data(device) = cdev; 268 device->driver_data = cdev;
269 result = sysfs_create_link(&device->dev.kobj, 269 result = sysfs_create_link(&device->dev.kobj,
270 &cdev->device.kobj, 270 &cdev->device.kobj,
271 "thermal_cooling"); 271 "thermal_cooling");
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index 65bf4fa59633..fcfdef7b4fdd 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -737,7 +737,7 @@ static int acpi_pci_link_add(struct acpi_device *device)
737 link->device = device; 737 link->device = device;
738 strcpy(acpi_device_name(device), ACPI_PCI_LINK_DEVICE_NAME); 738 strcpy(acpi_device_name(device), ACPI_PCI_LINK_DEVICE_NAME);
739 strcpy(acpi_device_class(device), ACPI_PCI_LINK_CLASS); 739 strcpy(acpi_device_class(device), ACPI_PCI_LINK_CLASS);
740 acpi_driver_data(device) = link; 740 device->driver_data = link;
741 741
742 mutex_lock(&acpi_link_lock); 742 mutex_lock(&acpi_link_lock);
743 result = acpi_pci_link_get_possible(link); 743 result = acpi_pci_link_get_possible(link);
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index c3fed31166b5..add1a19bbbfe 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -206,7 +206,7 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device)
206 root->device = device; 206 root->device = device;
207 strcpy(acpi_device_name(device), ACPI_PCI_ROOT_DEVICE_NAME); 207 strcpy(acpi_device_name(device), ACPI_PCI_ROOT_DEVICE_NAME);
208 strcpy(acpi_device_class(device), ACPI_PCI_ROOT_CLASS); 208 strcpy(acpi_device_class(device), ACPI_PCI_ROOT_CLASS);
209 acpi_driver_data(device) = root; 209 device->driver_data = root;
210 210
211 device->ops.bind = acpi_pci_bind; 211 device->ops.bind = acpi_pci_bind;
212 212
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c
index 7ff7349c0c52..e88edc008668 100644
--- a/drivers/acpi/power.c
+++ b/drivers/acpi/power.c
@@ -679,7 +679,7 @@ static int acpi_power_add(struct acpi_device *device)
679 strcpy(resource->name, device->pnp.bus_id); 679 strcpy(resource->name, device->pnp.bus_id);
680 strcpy(acpi_device_name(device), ACPI_POWER_DEVICE_NAME); 680 strcpy(acpi_device_name(device), ACPI_POWER_DEVICE_NAME);
681 strcpy(acpi_device_class(device), ACPI_POWER_CLASS); 681 strcpy(acpi_device_class(device), ACPI_POWER_CLASS);
682 acpi_driver_data(device) = resource; 682 device->driver_data = resource;
683 683
684 /* Evalute the object to get the system level and resource order. */ 684 /* Evalute the object to get the system level and resource order. */
685 status = acpi_evaluate_object(device->handle, NULL, NULL, &buffer); 685 status = acpi_evaluate_object(device->handle, NULL, NULL, &buffer);
@@ -755,7 +755,7 @@ static int acpi_power_resume(struct acpi_device *device)
755 if (!device || !acpi_driver_data(device)) 755 if (!device || !acpi_driver_data(device))
756 return -EINVAL; 756 return -EINVAL;
757 757
758 resource = (struct acpi_power_resource *)acpi_driver_data(device); 758 resource = acpi_driver_data(device);
759 759
760 result = acpi_power_get_state(device->handle, &state); 760 result = acpi_power_get_state(device->handle, &state);
761 if (result) 761 if (result)
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index ee68ac54c0d4..289461649196 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -818,7 +818,7 @@ static int acpi_processor_add(struct acpi_device *device)
818 pr->handle = device->handle; 818 pr->handle = device->handle;
819 strcpy(acpi_device_name(device), ACPI_PROCESSOR_DEVICE_NAME); 819 strcpy(acpi_device_name(device), ACPI_PROCESSOR_DEVICE_NAME);
820 strcpy(acpi_device_class(device), ACPI_PROCESSOR_CLASS); 820 strcpy(acpi_device_class(device), ACPI_PROCESSOR_CLASS);
821 acpi_driver_data(device) = pr; 821 device->driver_data = pr;
822 822
823 return 0; 823 return 0;
824} 824}
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c
index 10a36512647c..d0033250b5a9 100644
--- a/drivers/acpi/sbs.c
+++ b/drivers/acpi/sbs.c
@@ -931,7 +931,7 @@ static int acpi_sbs_add(struct acpi_device *device)
931 sbs->device = device; 931 sbs->device = device;
932 strcpy(acpi_device_name(device), ACPI_SBS_DEVICE_NAME); 932 strcpy(acpi_device_name(device), ACPI_SBS_DEVICE_NAME);
933 strcpy(acpi_device_class(device), ACPI_SBS_CLASS); 933 strcpy(acpi_device_class(device), ACPI_SBS_CLASS);
934 acpi_driver_data(device) = sbs; 934 device->driver_data = sbs;
935 935
936 result = acpi_charger_add(sbs); 936 result = acpi_charger_add(sbs);
937 if (result) 937 if (result)
diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c
index a4e3767b8c64..001d9143a2cb 100644
--- a/drivers/acpi/sbshc.c
+++ b/drivers/acpi/sbshc.c
@@ -282,7 +282,7 @@ static int acpi_smbus_hc_add(struct acpi_device *device)
282 hc->ec = acpi_driver_data(device->parent); 282 hc->ec = acpi_driver_data(device->parent);
283 hc->offset = (val >> 8) & 0xff; 283 hc->offset = (val >> 8) & 0xff;
284 hc->query_bit = val & 0xff; 284 hc->query_bit = val & 0xff;
285 acpi_driver_data(device) = hc; 285 device->driver_data = hc;
286 286
287 acpi_ec_add_query_handler(hc->ec, hc->query_bit, NULL, smbus_alarm, hc); 287 acpi_ec_add_query_handler(hc->ec, hc->query_bit, NULL, smbus_alarm, hc);
288 printk(KERN_INFO PREFIX "SBS HC: EC = 0x%p, offset = 0x%0x, query_bit = 0x%0x\n", 288 printk(KERN_INFO PREFIX "SBS HC: EC = 0x%p, offset = 0x%0x, query_bit = 0x%0x\n",
@@ -303,7 +303,7 @@ static int acpi_smbus_hc_remove(struct acpi_device *device, int type)
303 hc = acpi_driver_data(device); 303 hc = acpi_driver_data(device);
304 acpi_ec_remove_query_handler(hc->ec, hc->query_bit); 304 acpi_ec_remove_query_handler(hc->ec, hc->query_bit);
305 kfree(hc); 305 kfree(hc);
306 acpi_driver_data(device) = NULL; 306 device->driver_data = NULL;
307 return 0; 307 return 0;
308} 308}
309 309
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index eae6c801536d..a9dda8e0f9f9 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -391,7 +391,7 @@ static int acpi_device_remove(struct device * dev)
391 acpi_drv->ops.remove(acpi_dev, acpi_dev->removal_type); 391 acpi_drv->ops.remove(acpi_dev, acpi_dev->removal_type);
392 } 392 }
393 acpi_dev->driver = NULL; 393 acpi_dev->driver = NULL;
394 acpi_driver_data(dev) = NULL; 394 acpi_dev->driver_data = NULL;
395 395
396 put_device(dev); 396 put_device(dev);
397 return 0; 397 return 0;
@@ -544,7 +544,7 @@ acpi_bus_driver_init(struct acpi_device *device, struct acpi_driver *driver)
544 result = driver->ops.add(device); 544 result = driver->ops.add(device);
545 if (result) { 545 if (result) {
546 device->driver = NULL; 546 device->driver = NULL;
547 acpi_driver_data(device) = NULL; 547 device->driver_data = NULL;
548 return result; 548 return result;
549 } 549 }
550 550
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c
index d13194a031bf..4c21480b5820 100644
--- a/drivers/acpi/sleep/main.c
+++ b/drivers/acpi/sleep/main.c
@@ -23,6 +23,7 @@
23#include "sleep.h" 23#include "sleep.h"
24 24
25u8 sleep_states[ACPI_S_STATE_COUNT]; 25u8 sleep_states[ACPI_S_STATE_COUNT];
26static u32 acpi_target_sleep_state = ACPI_STATE_S0;
26 27
27static int acpi_sleep_prepare(u32 acpi_state) 28static int acpi_sleep_prepare(u32 acpi_state)
28{ 29{
@@ -45,9 +46,7 @@ static int acpi_sleep_prepare(u32 acpi_state)
45 return 0; 46 return 0;
46} 47}
47 48
48#ifdef CONFIG_PM_SLEEP 49#ifdef CONFIG_ACPI_SLEEP
49static u32 acpi_target_sleep_state = ACPI_STATE_S0;
50
51/* 50/*
52 * ACPI 1.0 wants us to execute _PTS before suspending devices, so we allow the 51 * ACPI 1.0 wants us to execute _PTS before suspending devices, so we allow the
53 * user to request that behavior by using the 'acpi_old_suspend_ordering' 52 * user to request that behavior by using the 'acpi_old_suspend_ordering'
@@ -132,7 +131,7 @@ static void acpi_pm_end(void)
132 */ 131 */
133 acpi_target_sleep_state = ACPI_STATE_S0; 132 acpi_target_sleep_state = ACPI_STATE_S0;
134} 133}
135#endif /* CONFIG_PM_SLEEP */ 134#endif /* CONFIG_ACPI_SLEEP */
136 135
137#ifdef CONFIG_SUSPEND 136#ifdef CONFIG_SUSPEND
138extern void do_suspend_lowlevel(void); 137extern void do_suspend_lowlevel(void);
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 263ec08a9011..f26c6463a09e 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -388,10 +388,12 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
388 } else if (crt > 0) { 388 } else if (crt > 0) {
389 unsigned long crt_k = CELSIUS_TO_KELVIN(crt); 389 unsigned long crt_k = CELSIUS_TO_KELVIN(crt);
390 /* 390 /*
391 * Allow override to lower critical threshold 391 * Allow override critical threshold
392 */ 392 */
393 if (crt_k < tz->trips.critical.temperature) 393 if (crt_k > tz->trips.critical.temperature)
394 tz->trips.critical.temperature = crt_k; 394 printk(KERN_WARNING PREFIX
395 "Critical threshold %d C\n", crt);
396 tz->trips.critical.temperature = crt_k;
395 } 397 }
396 } 398 }
397 } 399 }
@@ -1647,7 +1649,7 @@ static int acpi_thermal_add(struct acpi_device *device)
1647 strcpy(tz->name, device->pnp.bus_id); 1649 strcpy(tz->name, device->pnp.bus_id);
1648 strcpy(acpi_device_name(device), ACPI_THERMAL_DEVICE_NAME); 1650 strcpy(acpi_device_name(device), ACPI_THERMAL_DEVICE_NAME);
1649 strcpy(acpi_device_class(device), ACPI_THERMAL_CLASS); 1651 strcpy(acpi_device_class(device), ACPI_THERMAL_CLASS);
1650 acpi_driver_data(device) = tz; 1652 device->driver_data = tz;
1651 mutex_init(&tz->lock); 1653 mutex_init(&tz->lock);
1652 1654
1653 1655
diff --git a/drivers/acpi/toshiba_acpi.c b/drivers/acpi/toshiba_acpi.c
index 0a43c8e0eff3..4172d290f275 100644
--- a/drivers/acpi/toshiba_acpi.c
+++ b/drivers/acpi/toshiba_acpi.c
@@ -392,7 +392,7 @@ static unsigned long write_video(const char *buffer, unsigned long count)
392 392
393 hci_read1(HCI_VIDEO_OUT, &video_out, &hci_result); 393 hci_read1(HCI_VIDEO_OUT, &video_out, &hci_result);
394 if (hci_result == HCI_SUCCESS) { 394 if (hci_result == HCI_SUCCESS) {
395 int new_video_out = video_out; 395 unsigned int new_video_out = video_out;
396 if (lcd_out != -1) 396 if (lcd_out != -1)
397 _set_bit(&new_video_out, HCI_VIDEO_OUT_LCD, lcd_out); 397 _set_bit(&new_video_out, HCI_VIDEO_OUT_LCD, lcd_out);
398 if (crt_out != -1) 398 if (crt_out != -1)
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 4ae39ee8cdef..59fd299bb3d7 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -1491,7 +1491,7 @@ acpi_video_bus_get_one_device(struct acpi_device *device,
1491 1491
1492 strcpy(acpi_device_name(device), ACPI_VIDEO_DEVICE_NAME); 1492 strcpy(acpi_device_name(device), ACPI_VIDEO_DEVICE_NAME);
1493 strcpy(acpi_device_class(device), ACPI_VIDEO_CLASS); 1493 strcpy(acpi_device_class(device), ACPI_VIDEO_CLASS);
1494 acpi_driver_data(device) = data; 1494 device->driver_data = data;
1495 1495
1496 data->device_id = device_id; 1496 data->device_id = device_id;
1497 data->video = video; 1497 data->video = video;
@@ -1982,7 +1982,7 @@ static int acpi_video_bus_add(struct acpi_device *device)
1982 video->device = device; 1982 video->device = device;
1983 strcpy(acpi_device_name(device), ACPI_VIDEO_BUS_NAME); 1983 strcpy(acpi_device_name(device), ACPI_VIDEO_BUS_NAME);
1984 strcpy(acpi_device_class(device), ACPI_VIDEO_CLASS); 1984 strcpy(acpi_device_class(device), ACPI_VIDEO_CLASS);
1985 acpi_driver_data(device) = video; 1985 device->driver_data = video;
1986 1986
1987 acpi_video_bus_find_cap(video); 1987 acpi_video_bus_find_cap(video);
1988 error = acpi_video_bus_check(video); 1988 error = acpi_video_bus_check(video);
@@ -2058,7 +2058,7 @@ static int acpi_video_bus_add(struct acpi_device *device)
2058 acpi_video_bus_remove_fs(device); 2058 acpi_video_bus_remove_fs(device);
2059 err_free_video: 2059 err_free_video:
2060 kfree(video); 2060 kfree(video);
2061 acpi_driver_data(device) = NULL; 2061 device->driver_data = NULL;
2062 2062
2063 return error; 2063 return error;
2064} 2064}
diff --git a/drivers/misc/asus-laptop.c b/drivers/misc/asus-laptop.c
index 7c6dfd03de9f..57d81c713eab 100644
--- a/drivers/misc/asus-laptop.c
+++ b/drivers/misc/asus-laptop.c
@@ -139,6 +139,7 @@ ASUS_HANDLE(lcd_switch, "\\_SB.PCI0.SBRG.EC0._Q10", /* All new models */
139 "\\_SB.PCI0.PX40.ECD0._Q10", /* L3C */ 139 "\\_SB.PCI0.PX40.ECD0._Q10", /* L3C */
140 "\\_SB.PCI0.PX40.EC0.Q10", /* M1A */ 140 "\\_SB.PCI0.PX40.EC0.Q10", /* M1A */
141 "\\_SB.PCI0.LPCB.EC0._Q10", /* P30 */ 141 "\\_SB.PCI0.LPCB.EC0._Q10", /* P30 */
142 "\\_SB.PCI0.LPCB.EC0._Q0E", /* P30/P35 */
142 "\\_SB.PCI0.PX40.Q10", /* S1x */ 143 "\\_SB.PCI0.PX40.Q10", /* S1x */
143 "\\Q10"); /* A2x, L2D, L3D, M2E */ 144 "\\Q10"); /* A2x, L2D, L3D, M2E */
144 145
@@ -350,7 +351,7 @@ static void write_status(acpi_handle handle, int out, int mask)
350 static void object##_led_set(struct led_classdev *led_cdev, \ 351 static void object##_led_set(struct led_classdev *led_cdev, \
351 enum led_brightness value) \ 352 enum led_brightness value) \
352 { \ 353 { \
353 object##_led_wk = value; \ 354 object##_led_wk = (value > 0) ? 1 : 0; \
354 queue_work(led_workqueue, &object##_led_work); \ 355 queue_work(led_workqueue, &object##_led_work); \
355 } \ 356 } \
356 static void object##_led_update(struct work_struct *ignored) \ 357 static void object##_led_update(struct work_struct *ignored) \
@@ -996,7 +997,7 @@ static int asus_hotk_add(struct acpi_device *device)
996 hotk->handle = device->handle; 997 hotk->handle = device->handle;
997 strcpy(acpi_device_name(device), ASUS_HOTK_DEVICE_NAME); 998 strcpy(acpi_device_name(device), ASUS_HOTK_DEVICE_NAME);
998 strcpy(acpi_device_class(device), ASUS_HOTK_CLASS); 999 strcpy(acpi_device_class(device), ASUS_HOTK_CLASS);
999 acpi_driver_data(device) = hotk; 1000 device->driver_data = hotk;
1000 hotk->device = device; 1001 hotk->device = device;
1001 1002
1002 result = asus_hotk_check(); 1003 result = asus_hotk_check();
diff --git a/drivers/misc/eeepc-laptop.c b/drivers/misc/eeepc-laptop.c
index 5baa10bcaf6d..7b39e0f0f1be 100644
--- a/drivers/misc/eeepc-laptop.c
+++ b/drivers/misc/eeepc-laptop.c
@@ -554,7 +554,7 @@ static int eeepc_hotk_add(struct acpi_device *device)
554 ehotk->handle = device->handle; 554 ehotk->handle = device->handle;
555 strcpy(acpi_device_name(device), EEEPC_HOTK_DEVICE_NAME); 555 strcpy(acpi_device_name(device), EEEPC_HOTK_DEVICE_NAME);
556 strcpy(acpi_device_class(device), EEEPC_HOTK_CLASS); 556 strcpy(acpi_device_class(device), EEEPC_HOTK_CLASS);
557 acpi_driver_data(device) = ehotk; 557 device->driver_data = ehotk;
558 ehotk->device = device; 558 ehotk->device = device;
559 result = eeepc_hotk_check(); 559 result = eeepc_hotk_check();
560 if (result) 560 if (result)
diff --git a/drivers/misc/fujitsu-laptop.c b/drivers/misc/fujitsu-laptop.c
index f861db072777..8555a17f00ef 100644
--- a/drivers/misc/fujitsu-laptop.c
+++ b/drivers/misc/fujitsu-laptop.c
@@ -508,7 +508,7 @@ static int acpi_fujitsu_add(struct acpi_device *device)
508 fujitsu->acpi_handle = device->handle; 508 fujitsu->acpi_handle = device->handle;
509 sprintf(acpi_device_name(device), "%s", ACPI_FUJITSU_DEVICE_NAME); 509 sprintf(acpi_device_name(device), "%s", ACPI_FUJITSU_DEVICE_NAME);
510 sprintf(acpi_device_class(device), "%s", ACPI_FUJITSU_CLASS); 510 sprintf(acpi_device_class(device), "%s", ACPI_FUJITSU_CLASS);
511 acpi_driver_data(device) = fujitsu; 511 device->driver_data = fujitsu;
512 512
513 status = acpi_install_notify_handler(device->handle, 513 status = acpi_install_notify_handler(device->handle,
514 ACPI_DEVICE_NOTIFY, 514 ACPI_DEVICE_NOTIFY,
@@ -718,7 +718,7 @@ static int acpi_fujitsu_hotkey_add(struct acpi_device *device)
718 sprintf(acpi_device_name(device), "%s", 718 sprintf(acpi_device_name(device), "%s",
719 ACPI_FUJITSU_HOTKEY_DEVICE_NAME); 719 ACPI_FUJITSU_HOTKEY_DEVICE_NAME);
720 sprintf(acpi_device_class(device), "%s", ACPI_FUJITSU_CLASS); 720 sprintf(acpi_device_class(device), "%s", ACPI_FUJITSU_CLASS);
721 acpi_driver_data(device) = fujitsu_hotkey; 721 device->driver_data = fujitsu_hotkey;
722 722
723 status = acpi_install_notify_handler(device->handle, 723 status = acpi_install_notify_handler(device->handle,
724 ACPI_DEVICE_NOTIFY, 724 ACPI_DEVICE_NOTIFY,
diff --git a/drivers/misc/intel_menlow.c b/drivers/misc/intel_menlow.c
index 80a136352408..cd3ea7faa5b6 100644
--- a/drivers/misc/intel_menlow.c
+++ b/drivers/misc/intel_menlow.c
@@ -175,7 +175,7 @@ static int intel_menlow_memory_add(struct acpi_device *device)
175 goto end; 175 goto end;
176 } 176 }
177 177
178 acpi_driver_data(device) = cdev; 178 device->driver_data = cdev;
179 result = sysfs_create_link(&device->dev.kobj, 179 result = sysfs_create_link(&device->dev.kobj,
180 &cdev->device.kobj, "thermal_cooling"); 180 &cdev->device.kobj, "thermal_cooling");
181 if (result) 181 if (result)
diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c
index 60775be22822..5a97d3a9d745 100644
--- a/drivers/misc/sony-laptop.c
+++ b/drivers/misc/sony-laptop.c
@@ -970,7 +970,7 @@ static int sony_nc_resume(struct acpi_device *device)
970 /* set the last requested brightness level */ 970 /* set the last requested brightness level */
971 if (sony_backlight_device && 971 if (sony_backlight_device &&
972 !sony_backlight_update_status(sony_backlight_device)) 972 !sony_backlight_update_status(sony_backlight_device))
973 printk(KERN_WARNING DRV_PFX "unable to restore brightness level"); 973 printk(KERN_WARNING DRV_PFX "unable to restore brightness level\n");
974 974
975 /* re-initialize models with specific requirements */ 975 /* re-initialize models with specific requirements */
976 dmi_check_system(sony_nc_ids); 976 dmi_check_system(sony_nc_ids);
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
index 6b9300779a43..62aebaa85913 100644
--- a/drivers/misc/thinkpad_acpi.c
+++ b/drivers/misc/thinkpad_acpi.c
@@ -543,7 +543,7 @@ static int __init setup_acpi_notify(struct ibm_struct *ibm)
543 return -ENODEV; 543 return -ENODEV;
544 } 544 }
545 545
546 acpi_driver_data(ibm->acpi->device) = ibm; 546 ibm->acpi->device->driver_data = ibm;
547 sprintf(acpi_device_class(ibm->acpi->device), "%s/%s", 547 sprintf(acpi_device_class(ibm->acpi->device), "%s/%s",
548 TPACPI_ACPI_EVENT_PREFIX, 548 TPACPI_ACPI_EVENT_PREFIX,
549 ibm->name); 549 ibm->name);
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index f74f882609f8..c1b5556c985d 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -300,7 +300,11 @@ struct acpi_device {
300 enum acpi_bus_removal_type removal_type; /* indicate for different removal type */ 300 enum acpi_bus_removal_type removal_type; /* indicate for different removal type */
301}; 301};
302 302
303#define acpi_driver_data(d) ((d)->driver_data) 303static inline void *acpi_driver_data(struct acpi_device *d)
304{
305 return d->driver_data;
306}
307
304#define to_acpi_device(d) container_of(d, struct acpi_device, dev) 308#define to_acpi_device(d) container_of(d, struct acpi_device, dev)
305#define to_acpi_driver(d) container_of(d, struct acpi_driver, drv) 309#define to_acpi_driver(d) container_of(d, struct acpi_driver, drv)
306 310