diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-03-27 11:03:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-03-27 11:03:22 -0400 |
commit | c94b4321ebde51a80a805f7a5e102ac083ae2ac9 (patch) | |
tree | ac6e0f251436d7e800ba12e783126a6d572b4623 /drivers/acpi | |
parent | f6d107fb10def502522b10bfb7af9533afbb8274 (diff) | |
parent | 1192aeb957402b45f311895f124e4ca41206843c (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
ACPI: drivers/acpi: elide a non-zero test on a result that is never 0
pnpacpi: reduce printk severity for "pnpacpi: exceeded the max number of ..."
cpuidle: fix 100% C0 statistics regression
cpuidle: fix cpuidle time and usage overflow
ACPI: fix mis-merge -- invoke acpi_unlazy_tlb() only on C3 entry
ACPI: fix a regression of ACPI device driver autoloading
ACPI: SBS: remove typo from sbchc.c
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/fan.c | 34 | ||||
-rw-r--r-- | drivers/acpi/processor_core.c | 30 | ||||
-rw-r--r-- | drivers/acpi/processor_idle.c | 7 | ||||
-rw-r--r-- | drivers/acpi/sbshc.c | 1 | ||||
-rw-r--r-- | drivers/acpi/scan.c | 18 | ||||
-rw-r--r-- | drivers/acpi/video.c | 28 |
6 files changed, 60 insertions, 58 deletions
diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c index c8e3cba423ef..4d535c50d821 100644 --- a/drivers/acpi/fan.c +++ b/drivers/acpi/fan.c | |||
@@ -260,24 +260,22 @@ static int acpi_fan_add(struct acpi_device *device) | |||
260 | result = PTR_ERR(cdev); | 260 | result = PTR_ERR(cdev); |
261 | goto end; | 261 | goto end; |
262 | } | 262 | } |
263 | if (cdev) { | 263 | printk(KERN_INFO PREFIX |
264 | printk(KERN_INFO PREFIX | 264 | "%s is registered as cooling_device%d\n", |
265 | "%s is registered as cooling_device%d\n", | 265 | device->dev.bus_id, cdev->id); |
266 | device->dev.bus_id, cdev->id); | 266 | |
267 | 267 | acpi_driver_data(device) = cdev; | |
268 | acpi_driver_data(device) = cdev; | 268 | result = sysfs_create_link(&device->dev.kobj, |
269 | result = sysfs_create_link(&device->dev.kobj, | 269 | &cdev->device.kobj, |
270 | &cdev->device.kobj, | 270 | "thermal_cooling"); |
271 | "thermal_cooling"); | 271 | if (result) |
272 | if (result) | 272 | return result; |
273 | return result; | 273 | |
274 | 274 | result = sysfs_create_link(&cdev->device.kobj, | |
275 | result = sysfs_create_link(&cdev->device.kobj, | 275 | &device->dev.kobj, |
276 | &device->dev.kobj, | 276 | "device"); |
277 | "device"); | 277 | if (result) |
278 | if (result) | 278 | return result; |
279 | return result; | ||
280 | } | ||
281 | 279 | ||
282 | result = acpi_fan_add_fs(device); | 280 | result = acpi_fan_add_fs(device); |
283 | if (result) | 281 | if (result) |
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 36a68fa114e3..3a136f6c66a3 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
@@ -674,22 +674,20 @@ static int __cpuinit acpi_processor_start(struct acpi_device *device) | |||
674 | result = PTR_ERR(pr->cdev); | 674 | result = PTR_ERR(pr->cdev); |
675 | goto end; | 675 | goto end; |
676 | } | 676 | } |
677 | if (pr->cdev) { | 677 | printk(KERN_INFO PREFIX |
678 | printk(KERN_INFO PREFIX | 678 | "%s is registered as cooling_device%d\n", |
679 | "%s is registered as cooling_device%d\n", | 679 | device->dev.bus_id, pr->cdev->id); |
680 | device->dev.bus_id, pr->cdev->id); | 680 | |
681 | 681 | result = sysfs_create_link(&device->dev.kobj, | |
682 | result = sysfs_create_link(&device->dev.kobj, | 682 | &pr->cdev->device.kobj, |
683 | &pr->cdev->device.kobj, | 683 | "thermal_cooling"); |
684 | "thermal_cooling"); | 684 | if (result) |
685 | if (result) | 685 | return result; |
686 | return result; | 686 | result = sysfs_create_link(&pr->cdev->device.kobj, |
687 | result = sysfs_create_link(&pr->cdev->device.kobj, | 687 | &device->dev.kobj, |
688 | &device->dev.kobj, | 688 | "device"); |
689 | "device"); | 689 | if (result) |
690 | if (result) | 690 | return result; |
691 | return result; | ||
692 | } | ||
693 | 691 | ||
694 | if (pr->flags.throttling) { | 692 | if (pr->flags.throttling) { |
695 | printk(KERN_INFO PREFIX "%s [%s] (supports", | 693 | printk(KERN_INFO PREFIX "%s [%s] (supports", |
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index e8e2d8869236..788da9781f80 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -1487,7 +1487,6 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev, | |||
1487 | return 0; | 1487 | return 0; |
1488 | } | 1488 | } |
1489 | 1489 | ||
1490 | acpi_unlazy_tlb(smp_processor_id()); | ||
1491 | /* | 1490 | /* |
1492 | * Must be done before busmaster disable as we might need to | 1491 | * Must be done before busmaster disable as we might need to |
1493 | * access HPET ! | 1492 | * access HPET ! |
@@ -1577,6 +1576,8 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, | |||
1577 | return 0; | 1576 | return 0; |
1578 | } | 1577 | } |
1579 | 1578 | ||
1579 | acpi_unlazy_tlb(smp_processor_id()); | ||
1580 | |||
1580 | /* Tell the scheduler that we are going deep-idle: */ | 1581 | /* Tell the scheduler that we are going deep-idle: */ |
1581 | sched_clock_idle_sleep_event(); | 1582 | sched_clock_idle_sleep_event(); |
1582 | /* | 1583 | /* |
@@ -1692,7 +1693,9 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr) | |||
1692 | switch (cx->type) { | 1693 | switch (cx->type) { |
1693 | case ACPI_STATE_C1: | 1694 | case ACPI_STATE_C1: |
1694 | state->flags |= CPUIDLE_FLAG_SHALLOW; | 1695 | state->flags |= CPUIDLE_FLAG_SHALLOW; |
1695 | state->flags |= CPUIDLE_FLAG_TIME_VALID; | 1696 | if (cx->entry_method == ACPI_CSTATE_FFH) |
1697 | state->flags |= CPUIDLE_FLAG_TIME_VALID; | ||
1698 | |||
1696 | state->enter = acpi_idle_enter_c1; | 1699 | state->enter = acpi_idle_enter_c1; |
1697 | dev->safe_state = state; | 1700 | dev->safe_state = state; |
1698 | break; | 1701 | break; |
diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c index a2cf3008ce6c..bcf2c70fca87 100644 --- a/drivers/acpi/sbshc.c +++ b/drivers/acpi/sbshc.c | |||
@@ -130,7 +130,6 @@ static int acpi_smbus_transaction(struct acpi_smb_hc *hc, u8 protocol, | |||
130 | goto end; | 130 | goto end; |
131 | } | 131 | } |
132 | smb_hc_write(hc, ACPI_SMB_COMMAND, command); | 132 | smb_hc_write(hc, ACPI_SMB_COMMAND, command); |
133 | smb_hc_write(hc, ACPI_SMB_COMMAND, command); | ||
134 | if (!(protocol & 0x01)) { | 133 | if (!(protocol & 0x01)) { |
135 | smb_hc_write(hc, ACPI_SMB_BLOCK_COUNT, length); | 134 | smb_hc_write(hc, ACPI_SMB_BLOCK_COUNT, length); |
136 | for (i = 0; i < length; ++i) | 135 | for (i = 0; i < length; ++i) |
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 57570ac47803..e6ce262b5d44 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -39,20 +39,26 @@ static int create_modalias(struct acpi_device *acpi_dev, char *modalias, | |||
39 | int size) | 39 | int size) |
40 | { | 40 | { |
41 | int len; | 41 | int len; |
42 | int count; | ||
42 | 43 | ||
43 | if (!acpi_dev->flags.hardware_id) | 44 | if (!acpi_dev->flags.hardware_id && !acpi_dev->flags.compatible_ids) |
44 | return -ENODEV; | 45 | return -ENODEV; |
45 | 46 | ||
46 | len = snprintf(modalias, size, "acpi:%s:", | 47 | len = snprintf(modalias, size, "acpi:"); |
47 | acpi_dev->pnp.hardware_id); | ||
48 | if (len < 0 || len >= size) | ||
49 | return -EINVAL; | ||
50 | size -= len; | 48 | size -= len; |
51 | 49 | ||
50 | if (acpi_dev->flags.hardware_id) { | ||
51 | count = snprintf(&modalias[len], size, "%s:", | ||
52 | acpi_dev->pnp.hardware_id); | ||
53 | if (count < 0 || count >= size) | ||
54 | return -EINVAL; | ||
55 | len += count; | ||
56 | size -= count; | ||
57 | } | ||
58 | |||
52 | if (acpi_dev->flags.compatible_ids) { | 59 | if (acpi_dev->flags.compatible_ids) { |
53 | struct acpi_compatible_id_list *cid_list; | 60 | struct acpi_compatible_id_list *cid_list; |
54 | int i; | 61 | int i; |
55 | int count; | ||
56 | 62 | ||
57 | cid_list = acpi_dev->pnp.cid_list; | 63 | cid_list = acpi_dev->pnp.cid_list; |
58 | for (i = 0; i < cid_list->count; i++) { | 64 | for (i = 0; i < cid_list->count; i++) { |
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 12fb44f16766..fe09b57de617 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -734,21 +734,19 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) | |||
734 | if (IS_ERR(device->cdev)) | 734 | if (IS_ERR(device->cdev)) |
735 | return; | 735 | return; |
736 | 736 | ||
737 | if (device->cdev) { | 737 | printk(KERN_INFO PREFIX |
738 | printk(KERN_INFO PREFIX | 738 | "%s is registered as cooling_device%d\n", |
739 | "%s is registered as cooling_device%d\n", | 739 | device->dev->dev.bus_id, device->cdev->id); |
740 | device->dev->dev.bus_id, device->cdev->id); | 740 | result = sysfs_create_link(&device->dev->dev.kobj, |
741 | result = sysfs_create_link(&device->dev->dev.kobj, | 741 | &device->cdev->device.kobj, |
742 | &device->cdev->device.kobj, | 742 | "thermal_cooling"); |
743 | "thermal_cooling"); | 743 | if (result) |
744 | if (result) | 744 | printk(KERN_ERR PREFIX "Create sysfs link\n"); |
745 | printk(KERN_ERR PREFIX "Create sysfs link\n"); | 745 | result = sysfs_create_link(&device->cdev->device.kobj, |
746 | result = sysfs_create_link(&device->cdev->device.kobj, | 746 | &device->dev->dev.kobj, |
747 | &device->dev->dev.kobj, | 747 | "device"); |
748 | "device"); | 748 | if (result) |
749 | if (result) | 749 | printk(KERN_ERR PREFIX "Create sysfs link\n"); |
750 | printk(KERN_ERR PREFIX "Create sysfs link\n"); | ||
751 | } | ||
752 | } | 750 | } |
753 | if (device->cap._DCS && device->cap._DSS){ | 751 | if (device->cap._DCS && device->cap._DSS){ |
754 | static int count = 0; | 752 | static int count = 0; |