aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2007-03-09 23:19:50 -0500
committerLen Brown <len.brown@intel.com>2007-03-09 23:19:50 -0500
commit63e34ca93a62f472144db60fa3b81111c0d15721 (patch)
tree2137a4b98360833e78cbb8edd5dce5b2ab5a0a60 /drivers
parent51e7fff1c2b763da910db3a875eac5b992df91d9 (diff)
parent9327f46ee28116b17f15f6505edd90f905908d62 (diff)
Pull misc-for-upstream into release branch
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/Kconfig1
-rw-r--r--drivers/acpi/blacklist.c10
-rw-r--r--drivers/acpi/power.c7
-rw-r--r--drivers/acpi/video.c38
-rw-r--r--drivers/misc/asus-laptop.c2
-rw-r--r--drivers/misc/sony-laptop.c2
6 files changed, 30 insertions, 30 deletions
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index 4a3220b218d8..e2ce4a9c1c92 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -7,6 +7,7 @@ menu "ACPI (Advanced Configuration and Power Interface) Support"
7 depends on !X86_VISWS 7 depends on !X86_VISWS
8 depends on !IA64_HP_SIM 8 depends on !IA64_HP_SIM
9 depends on IA64 || X86 9 depends on IA64 || X86
10 depends on PM
10 11
11config ACPI 12config ACPI
12 bool "ACPI Support" 13 bool "ACPI Support"
diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c
index f289fd41e77d..3ec110ce00c8 100644
--- a/drivers/acpi/blacklist.c
+++ b/drivers/acpi/blacklist.c
@@ -79,11 +79,17 @@ static int __init blacklist_by_year(void)
79{ 79{
80 int year = dmi_get_year(DMI_BIOS_DATE); 80 int year = dmi_get_year(DMI_BIOS_DATE);
81 /* Doesn't exist? Likely an old system */ 81 /* Doesn't exist? Likely an old system */
82 if (year == -1) 82 if (year == -1) {
83 printk(KERN_ERR PREFIX "no DMI BIOS year, "
84 "acpi=force is required to enable ACPI\n" );
83 return 1; 85 return 1;
86 }
84 /* 0? Likely a buggy new BIOS */ 87 /* 0? Likely a buggy new BIOS */
85 if (year == 0) 88 if (year == 0) {
89 printk(KERN_ERR PREFIX "DMI BIOS year==0, "
90 "assuming ACPI-capable machine\n" );
86 return 0; 91 return 0;
92 }
87 if (year < CONFIG_ACPI_BLACKLIST_YEAR) { 93 if (year < CONFIG_ACPI_BLACKLIST_YEAR) {
88 printk(KERN_ERR PREFIX "BIOS age (%d) fails cutoff (%d), " 94 printk(KERN_ERR PREFIX "BIOS age (%d) fails cutoff (%d), "
89 "acpi=force is required to enable ACPI\n", 95 "acpi=force is required to enable ACPI\n",
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c
index 547eee7537bc..4ffecd179702 100644
--- a/drivers/acpi/power.c
+++ b/drivers/acpi/power.c
@@ -688,13 +688,6 @@ static int acpi_power_resume(struct acpi_device *device)
688 return result; 688 return result;
689 689
690 mutex_lock(&resource->resource_lock); 690 mutex_lock(&resource->resource_lock);
691 if ((resource->state == ACPI_POWER_RESOURCE_STATE_ON) &&
692 list_empty(&resource->reference)) {
693 mutex_unlock(&resource->resource_lock);
694 result = acpi_power_off_device(device->handle, NULL);
695 return result;
696 }
697
698 if ((resource->state == ACPI_POWER_RESOURCE_STATE_OFF) && 691 if ((resource->state == ACPI_POWER_RESOURCE_STATE_OFF) &&
699 !list_empty(&resource->reference)) { 692 !list_empty(&resource->reference)) {
700 ref = container_of(resource->reference.next, struct acpi_power_reference, node); 693 ref = container_of(resource->reference.next, struct acpi_power_reference, node);
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 0771b434feb2..00d25b347255 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -102,9 +102,9 @@ struct acpi_video_bus_cap {
102 102
103struct acpi_video_device_attrib { 103struct acpi_video_device_attrib {
104 u32 display_index:4; /* A zero-based instance of the Display */ 104 u32 display_index:4; /* A zero-based instance of the Display */
105 u32 display_port_attachment:4; /*This field differenates displays type */ 105 u32 display_port_attachment:4; /*This field differentiates the display type */
106 u32 display_type:4; /*Describe the specific type in use */ 106 u32 display_type:4; /*Describe the specific type in use */
107 u32 vendor_specific:4; /*Chipset Vendor Specifi */ 107 u32 vendor_specific:4; /*Chipset Vendor Specific */
108 u32 bios_can_detect:1; /*BIOS can detect the device */ 108 u32 bios_can_detect:1; /*BIOS can detect the device */
109 u32 depend_on_vga:1; /*Non-VGA output device whose power is related to 109 u32 depend_on_vga:1; /*Non-VGA output device whose power is related to
110 the VGA device. */ 110 the VGA device. */
@@ -484,16 +484,16 @@ acpi_video_bus_POST_options(struct acpi_video_bus *video,
484 * 0. The system BIOS should NOT automatically switch(toggle) 484 * 0. The system BIOS should NOT automatically switch(toggle)
485 * the active display output. 485 * the active display output.
486 * 1. The system BIOS should automatically switch (toggle) the 486 * 1. The system BIOS should automatically switch (toggle) the
487 * active display output. No swich event. 487 * active display output. No switch event.
488 * 2. The _DGS value should be locked. 488 * 2. The _DGS value should be locked.
489 * 3. The system BIOS should not automatically switch (toggle) the 489 * 3. The system BIOS should not automatically switch (toggle) the
490 * active display output, but instead generate the display switch 490 * active display output, but instead generate the display switch
491 * event notify code. 491 * event notify code.
492 * lcd_flag : 492 * lcd_flag :
493 * 0. The system BIOS should automatically control the brightness level 493 * 0. The system BIOS should automatically control the brightness level
494 * of the LCD, when the power changes from AC to DC 494 * of the LCD when the power changes from AC to DC
495 * 1. The system BIOS should NOT automatically control the brightness 495 * 1. The system BIOS should NOT automatically control the brightness
496 * level of the LCD, when the power changes from AC to DC. 496 * level of the LCD when the power changes from AC to DC.
497 * Return Value: 497 * Return Value:
498 * -1 wrong arg. 498 * -1 wrong arg.
499 */ 499 */
@@ -525,7 +525,7 @@ acpi_video_bus_DOS(struct acpi_video_bus *video, int bios_flag, int lcd_flag)
525 * Return Value: 525 * Return Value:
526 * None 526 * None
527 * 527 *
528 * Find out all required AML method defined under the output 528 * Find out all required AML methods defined under the output
529 * device. 529 * device.
530 */ 530 */
531 531
@@ -636,7 +636,7 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
636 * Return Value: 636 * Return Value:
637 * None 637 * None
638 * 638 *
639 * Find out all required AML method defined under the video bus device. 639 * Find out all required AML methods defined under the video bus device.
640 */ 640 */
641 641
642static void acpi_video_bus_find_cap(struct acpi_video_bus *video) 642static void acpi_video_bus_find_cap(struct acpi_video_bus *video)
@@ -681,19 +681,19 @@ static int acpi_video_bus_check(struct acpi_video_bus *video)
681 * to check well known required nodes. 681 * to check well known required nodes.
682 */ 682 */
683 683
684 /* Does this device able to support video switching ? */ 684 /* Does this device support video switching? */
685 if (video->cap._DOS) { 685 if (video->cap._DOS) {
686 video->flags.multihead = 1; 686 video->flags.multihead = 1;
687 status = 0; 687 status = 0;
688 } 688 }
689 689
690 /* Does this device able to retrieve a retrieve a video ROM ? */ 690 /* Does this device support retrieving a video ROM? */
691 if (video->cap._ROM) { 691 if (video->cap._ROM) {
692 video->flags.rom = 1; 692 video->flags.rom = 1;
693 status = 0; 693 status = 0;
694 } 694 }
695 695
696 /* Does this device able to configure which video device to POST ? */ 696 /* Does this device support configuring which video device to POST? */
697 if (video->cap._GPD && video->cap._SPD && video->cap._VPO) { 697 if (video->cap._GPD && video->cap._SPD && video->cap._VPO) {
698 video->flags.post = 1; 698 video->flags.post = 1;
699 status = 0; 699 status = 0;
@@ -860,7 +860,7 @@ acpi_video_device_write_brightness(struct file *file,
860 if (level > 100) 860 if (level > 100)
861 return -EFAULT; 861 return -EFAULT;
862 862
863 /* validate though the list of available levels */ 863 /* validate through the list of available levels */
864 for (i = 0; i < dev->brightness->count; i++) 864 for (i = 0; i < dev->brightness->count; i++)
865 if (level == dev->brightness->levels[i]) { 865 if (level == dev->brightness->levels[i]) {
866 if (ACPI_SUCCESS 866 if (ACPI_SUCCESS
@@ -1065,10 +1065,10 @@ static int acpi_video_bus_POST_info_seq_show(struct seq_file *seq, void *offset)
1065 printk(KERN_WARNING PREFIX 1065 printk(KERN_WARNING PREFIX
1066 "The motherboard VGA device is not listed as a possible POST device.\n"); 1066 "The motherboard VGA device is not listed as a possible POST device.\n");
1067 printk(KERN_WARNING PREFIX 1067 printk(KERN_WARNING PREFIX
1068 "This indicate a BIOS bug. Please contact the manufacturer.\n"); 1068 "This indicates a BIOS bug. Please contact the manufacturer.\n");
1069 } 1069 }
1070 printk("%lx\n", options); 1070 printk("%lx\n", options);
1071 seq_printf(seq, "can POST: <intgrated video>"); 1071 seq_printf(seq, "can POST: <integrated video>");
1072 if (options & 2) 1072 if (options & 2)
1073 seq_printf(seq, " <PCI video>"); 1073 seq_printf(seq, " <PCI video>");
1074 if (options & 4) 1074 if (options & 4)
@@ -1102,7 +1102,7 @@ static int acpi_video_bus_POST_seq_show(struct seq_file *seq, void *offset)
1102 seq_printf(seq, "<not supported>\n"); 1102 seq_printf(seq, "<not supported>\n");
1103 goto end; 1103 goto end;
1104 } 1104 }
1105 seq_printf(seq, "device posted is <%s>\n", device_decode[id & 3]); 1105 seq_printf(seq, "device POSTed is <%s>\n", device_decode[id & 3]);
1106 1106
1107 end: 1107 end:
1108 return 0; 1108 return 0;
@@ -1156,7 +1156,7 @@ acpi_video_bus_write_POST(struct file *file,
1156 if (opt > 3) 1156 if (opt > 3)
1157 return -EFAULT; 1157 return -EFAULT;
1158 1158
1159 /* just in case an OEM 'forget' the motherboard... */ 1159 /* just in case an OEM 'forgot' the motherboard... */
1160 options |= 1; 1160 options |= 1;
1161 1161
1162 if (options & (1ul << opt)) { 1162 if (options & (1ul << opt)) {
@@ -1527,13 +1527,13 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video)
1527/* 1527/*
1528 * Arg: 1528 * Arg:
1529 * video : video bus device 1529 * video : video bus device
1530 * event : Nontify Event 1530 * event : notify event
1531 * 1531 *
1532 * Return: 1532 * Return:
1533 * < 0 : error 1533 * < 0 : error
1534 * 1534 *
1535 * 1. Find out the current active output device. 1535 * 1. Find out the current active output device.
1536 * 2. Identify the next output device to switch 1536 * 2. Identify the next output device to switch to.
1537 * 3. call _DSS to do actual switch. 1537 * 3. call _DSS to do actual switch.
1538 */ 1538 */
1539 1539
@@ -1723,12 +1723,12 @@ static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data)
1723 device = video->device; 1723 device = video->device;
1724 1724
1725 switch (event) { 1725 switch (event) {
1726 case ACPI_VIDEO_NOTIFY_SWITCH: /* User request that a switch occur, 1726 case ACPI_VIDEO_NOTIFY_SWITCH: /* User requested a switch,
1727 * most likely via hotkey. */ 1727 * most likely via hotkey. */
1728 acpi_bus_generate_event(device, event, 0); 1728 acpi_bus_generate_event(device, event, 0);
1729 break; 1729 break;
1730 1730
1731 case ACPI_VIDEO_NOTIFY_PROBE: /* User plug or remove a video 1731 case ACPI_VIDEO_NOTIFY_PROBE: /* User plugged in or removed a video
1732 * connector. */ 1732 * connector. */
1733 acpi_video_device_enumerate(video); 1733 acpi_video_device_enumerate(video);
1734 acpi_video_device_rebind(video); 1734 acpi_video_device_rebind(video);
diff --git a/drivers/misc/asus-laptop.c b/drivers/misc/asus-laptop.c
index 295e931c0dfb..4b232124a1ab 100644
--- a/drivers/misc/asus-laptop.c
+++ b/drivers/misc/asus-laptop.c
@@ -211,7 +211,7 @@ static struct workqueue_struct *led_workqueue;
211 enum led_brightness value); \ 211 enum led_brightness value); \
212 static void object##_led_update(struct work_struct *ignored); \ 212 static void object##_led_update(struct work_struct *ignored); \
213 static int object##_led_wk; \ 213 static int object##_led_wk; \
214 DECLARE_WORK(object##_led_work, object##_led_update); \ 214 static DECLARE_WORK(object##_led_work, object##_led_update); \
215 static struct led_classdev object##_led = { \ 215 static struct led_classdev object##_led = { \
216 .name = "asus:" ledname, \ 216 .name = "asus:" ledname, \
217 .brightness_set = object##_led_set, \ 217 .brightness_set = object##_led_set, \
diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c
index 2ebe240dd537..ac708bc2f9f3 100644
--- a/drivers/misc/sony-laptop.c
+++ b/drivers/misc/sony-laptop.c
@@ -453,7 +453,7 @@ static int sony_acpi_resume(struct acpi_device *device)
453static int sony_acpi_add(struct acpi_device *device) 453static int sony_acpi_add(struct acpi_device *device)
454{ 454{
455 acpi_status status; 455 acpi_status status;
456 int result; 456 int result = 0;
457 acpi_handle handle; 457 acpi_handle handle;
458 458
459 sony_acpi_acpi_device = device; 459 sony_acpi_acpi_device = device;