aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2006-12-05 09:37:56 -0500
committerDavid Howells <dhowells@warthog.cambridge.redhat.com>2006-12-05 09:37:56 -0500
commit4c1ac1b49122b805adfa4efc620592f68dccf5db (patch)
tree87557f4bc2fd4fe65b7570489c2f610c45c0adcd /drivers/acpi
parentc4028958b6ecad064b1a6303a6a5906d4fe48d73 (diff)
parentd916faace3efc0bf19fe9a615a1ab8fa1a24cd93 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: drivers/infiniband/core/iwcm.c drivers/net/chelsio/cxgb2.c drivers/net/wireless/bcm43xx/bcm43xx_main.c drivers/net/wireless/prism54/islpci_eth.c drivers/usb/core/hub.h drivers/usb/input/hid-core.c net/core/netpoll.c Fix up merge failures with Linus's head and fix new compilation failures. Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/glue.c20
-rw-r--r--drivers/acpi/processor_perflib.c4
2 files changed, 12 insertions, 12 deletions
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c
index 10f160dc75b1..a2f46d587d55 100644
--- a/drivers/acpi/glue.c
+++ b/drivers/acpi/glue.c
@@ -267,9 +267,9 @@ static int acpi_bind_one(struct device *dev, acpi_handle handle)
267{ 267{
268 acpi_status status; 268 acpi_status status;
269 269
270 if (dev->firmware_data) { 270 if (dev->archdata.acpi_handle) {
271 printk(KERN_WARNING PREFIX 271 printk(KERN_WARNING PREFIX
272 "Drivers changed 'firmware_data' for %s\n", dev->bus_id); 272 "Drivers changed 'acpi_handle' for %s\n", dev->bus_id);
273 return -EINVAL; 273 return -EINVAL;
274 } 274 }
275 get_device(dev); 275 get_device(dev);
@@ -278,25 +278,26 @@ static int acpi_bind_one(struct device *dev, acpi_handle handle)
278 put_device(dev); 278 put_device(dev);
279 return -EINVAL; 279 return -EINVAL;
280 } 280 }
281 dev->firmware_data = handle; 281 dev->archdata.acpi_handle = handle;
282 282
283 return 0; 283 return 0;
284} 284}
285 285
286static int acpi_unbind_one(struct device *dev) 286static int acpi_unbind_one(struct device *dev)
287{ 287{
288 if (!dev->firmware_data) 288 if (!dev->archdata.acpi_handle)
289 return 0; 289 return 0;
290 if (dev == acpi_get_physical_device(dev->firmware_data)) { 290 if (dev == acpi_get_physical_device(dev->archdata.acpi_handle)) {
291 /* acpi_get_physical_device increase refcnt by one */ 291 /* acpi_get_physical_device increase refcnt by one */
292 put_device(dev); 292 put_device(dev);
293 acpi_detach_data(dev->firmware_data, acpi_glue_data_handler); 293 acpi_detach_data(dev->archdata.acpi_handle,
294 dev->firmware_data = NULL; 294 acpi_glue_data_handler);
295 dev->archdata.acpi_handle = NULL;
295 /* acpi_bind_one increase refcnt by one */ 296 /* acpi_bind_one increase refcnt by one */
296 put_device(dev); 297 put_device(dev);
297 } else { 298 } else {
298 printk(KERN_ERR PREFIX 299 printk(KERN_ERR PREFIX
299 "Oops, 'firmware_data' corrupt for %s\n", dev->bus_id); 300 "Oops, 'acpi_handle' corrupt for %s\n", dev->bus_id);
300 } 301 }
301 return 0; 302 return 0;
302} 303}
@@ -328,7 +329,8 @@ static int acpi_platform_notify(struct device *dev)
328 if (!ret) { 329 if (!ret) {
329 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 330 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
330 331
331 acpi_get_name(dev->firmware_data, ACPI_FULL_PATHNAME, &buffer); 332 acpi_get_name(dev->archdata.acpi_handle,
333 ACPI_FULL_PATHNAME, &buffer);
332 DBG("Device %s -> %s\n", dev->bus_id, (char *)buffer.pointer); 334 DBG("Device %s -> %s\n", dev->bus_id, (char *)buffer.pointer);
333 kfree(buffer.pointer); 335 kfree(buffer.pointer);
334 } else 336 } else
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c
index 7ba5e49ab302..6fd174a37149 100644
--- a/drivers/acpi/processor_perflib.c
+++ b/drivers/acpi/processor_perflib.c
@@ -83,10 +83,8 @@ static int acpi_processor_ppc_notifier(struct notifier_block *nb,
83 goto out; 83 goto out;
84 84
85 ppc = (unsigned int)pr->performance_platform_limit; 85 ppc = (unsigned int)pr->performance_platform_limit;
86 if (!ppc)
87 goto out;
88 86
89 if (ppc > pr->performance->state_count) 87 if (ppc >= pr->performance->state_count)
90 goto out; 88 goto out;
91 89
92 cpufreq_verify_within_limits(policy, 0, 90 cpufreq_verify_within_limits(policy, 0,