Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.4.1 /drivers/acpi/driver.c

Filename:/drivers/acpi/driver.c
Lines Added:20
Lines Deleted:8
Also changed in: (Previous) 2.4.1-pre12  2.4.0-prerelease  2.4.0-test12  2.4.0-test11  2.4.0-test9  2.4.0-test4 
(Following) 2.4.1-ac10  2.4.1-ac11  2.4.1-ac12  2.4.1-ac13  2.4.1-ac14  2.4.1-ac15 

Location
[  2.4.1
  [  drivers
    [  acpi
       o  driver.c

Patch

diff -u --recursive --new-file v2.4.0/linux/drivers/acpi/driver.c linux/drivers/acpi/driver.c
--- v2.4.0/linux/drivers/acpi/driver.c   Fri Dec 29 14:07:21 2000
+++ linux/drivers/acpi/driver.c   Mon Jan 29 10:15:58 2001
@@ -55,7 +55,7 @@
 
 static spinlock_t acpi_event_lock = SPIN_LOCK_UNLOCKED;
 static volatile u32 acpi_event_status = 0;
-static volatile acpi_sstate_t acpi_event_state = ACPI_S0;
+static volatile acpi_sstate_t acpi_event_state = ACPI_STATE_S0;
 static DECLARE_WAIT_QUEUE_HEAD(acpi_event_wait);
 
 static volatile int acpi_thread_pid = -1;
@@ -243,7 +243,7 @@
 /*
  * Enter system sleep state
  */
-static int 
+/*static int 
 acpi_do_sleep(ctl_table * ctl,
          int write,
          struct file *file,
@@ -257,13 +257,13 @@
       }
    }
    else {
-      int status = acpi_enter_sx(ACPI_S1);
+      int status = acpi_enter_sx(ACPI_STATE_S1);
       if (status)
          return status;
    }
    file->f_pos += *len;
    return 0;
-}
+}*/
 
 
 /*
@@ -382,7 +382,8 @@
     &acpi_c3_enter_latency, sizeof(acpi_c3_enter_latency),
     0644, NULL, &acpi_do_ulong},
 
-   {ACPI_SLEEP, "sleep", NULL, 0, 0600, NULL, &acpi_do_sleep},
+/* until it actually works */
+/*   {ACPI_SLEEP, "sleep", NULL, 0, 0600, NULL, &acpi_do_sleep},*/
 
    {ACPI_EVENT, "event", NULL, 0, 0400, NULL, &acpi_do_event},
 
@@ -415,7 +416,9 @@
 static int
 acpi_thread(void *context)
 {
-   ACPI_PHYSICAL_ADDRESS rsdp_phys;
+   ACPI_PHYSICAL_ADDRESS   rsdp_phys;
+   ACPI_BUFFER      buffer;
+   ACPI_SYSTEM_INFO   sys_info;
 
    /*
     * initialize
@@ -437,8 +440,6 @@
    rsdp_phys = efi.acpi;
 #endif
       
-   printk(KERN_ERR "ACPI: System description tables found\n");
-   
    if (!ACPI_SUCCESS(acpi_find_and_load_tables(rsdp_phys)))
       return -ENODEV;
 
@@ -447,6 +448,17 @@
       acpi_terminate();
       return -ENODEV;
    }
+
+   buffer.length  = sizeof(sys_info);
+   buffer.pointer = &sys_info;
+
+   if (!ACPI_SUCCESS (acpi_get_system_info(&buffer))) {
+      printk(KERN_ERR "ACPI: Could not get system info\n");
+      acpi_terminate();
+      return -ENODEV;
+   }
+
+   printk(KERN_INFO "ACPI: Core Subsystem version [%x]\n", sys_info.acpi_ca_version);
 
    if (!ACPI_SUCCESS(acpi_enable_subsystem(ACPI_FULL_INITIALIZATION))) {
       printk(KERN_ERR "ACPI: Subsystem enable failed\n");


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.