Commit 60109b52 authored by Andy Grover's avatar Andy Grover

remove #ifdef HANE_NEW_DEVICE_MODEL because we always have it

parent 68c70278
/* /*
* acpi_system.c - ACPI System Driver ($Revision: 57 $) * acpi_system.c - ACPI System Driver ($Revision: 60 $)
* *
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com> * Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com> * Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
*/ */
#define ACPI_C #define ACPI_C
#define HAVE_NEW_DEVICE_MODEL
#include <linux/config.h> #include <linux/config.h>
#include <linux/kernel.h> #include <linux/kernel.h>
...@@ -126,7 +125,7 @@ acpi_system_restore_state ( ...@@ -126,7 +125,7 @@ acpi_system_restore_state (
/* wait for power to come back */ /* wait for power to come back */
mdelay(10); mdelay(10);
#ifdef HAVE_NEW_DEVICE_MODEL
/* turn all the devices back on */ /* turn all the devices back on */
device_resume(RESUME_POWER_ON); device_resume(RESUME_POWER_ON);
...@@ -135,11 +134,8 @@ acpi_system_restore_state ( ...@@ -135,11 +134,8 @@ acpi_system_restore_state (
/* restore device context */ /* restore device context */
device_resume(RESUME_RESTORE_STATE); device_resume(RESUME_RESTORE_STATE);
#else
#error Resume cant work without driver model
#endif
if ((state == ACPI_STATE_S1) && (dmi_broken & BROKEN_INIT_AFTER_S1)) { if (dmi_broken & BROKEN_INIT_AFTER_S1) {
printk("Broken toshiba laptop -> kicking interrupts\n"); printk("Broken toshiba laptop -> kicking interrupts\n");
init_8259A(0); init_8259A(0);
} }
...@@ -166,7 +162,6 @@ acpi_system_save_state( ...@@ -166,7 +162,6 @@ acpi_system_save_state(
{ {
int error = 0; int error = 0;
#ifdef HAVE_NEW_DEVICE_MODEL
/* Send notification to devices that they will be suspended. /* Send notification to devices that they will be suspended.
* If any device or driver cannot make the transition, either up * If any device or driver cannot make the transition, either up
* or down, we'll get an error back. * or down, we'll get an error back.
...@@ -174,10 +169,9 @@ acpi_system_save_state( ...@@ -174,10 +169,9 @@ acpi_system_save_state(
error = device_suspend(state, SUSPEND_NOTIFY); error = device_suspend(state, SUSPEND_NOTIFY);
if (error) if (error)
return AE_ERROR; return AE_ERROR;
#endif
if (state < ACPI_STATE_S5) { if (state < ACPI_STATE_S5) {
#ifdef HAVE_NEW_DEVICE_MODEL
/* Tell devices to stop I/O and actually save their state. /* Tell devices to stop I/O and actually save their state.
* It is theoretically possible that something could fail, * It is theoretically possible that something could fail,
* so handle that gracefully.. * so handle that gracefully..
...@@ -190,7 +184,6 @@ acpi_system_save_state( ...@@ -190,7 +184,6 @@ acpi_system_save_state(
device_resume(RESUME_RESTORE_STATE); device_resume(RESUME_RESTORE_STATE);
return error; return error;
} }
#endif
/* flush caches */ /* flush caches */
ACPI_FLUSH_CPU_CACHE(); ACPI_FLUSH_CPU_CACHE();
...@@ -202,15 +195,13 @@ acpi_system_save_state( ...@@ -202,15 +195,13 @@ acpi_system_save_state(
if (!error && (state == ACPI_STATE_S4)) if (!error && (state == ACPI_STATE_S4))
error = acpi_save_state_disk(); error = acpi_save_state_disk();
#ifdef HAVE_NEW_DEVICE_MODEL
if (error) { if (error) {
device_resume(RESUME_RESTORE_STATE); device_resume(RESUME_RESTORE_STATE);
return error; return error;
} }
#endif
} }
} }
#ifdef HAVE_NEW_DEVICE_MODEL
/* disable interrupts /* disable interrupts
* Note that acpi_suspend -- our caller -- will do this once we return. * Note that acpi_suspend -- our caller -- will do this once we return.
* But, we want it done early, so we don't get any suprises during * But, we want it done early, so we don't get any suprises during
...@@ -233,7 +224,7 @@ acpi_system_save_state( ...@@ -233,7 +224,7 @@ acpi_system_save_state(
*/ */
if (error && state != ACPI_STATE_S5) if (error && state != ACPI_STATE_S5)
acpi_system_restore_state(state); acpi_system_restore_state(state);
#endif
return error ? AE_ERROR : AE_OK; return error ? AE_ERROR : AE_OK;
} }
...@@ -515,12 +506,12 @@ acpi_system_read_dsdt ( ...@@ -515,12 +506,12 @@ acpi_system_read_dsdt (
if (size > count) if (size > count)
size = count; size = count;
if (copy_to_user(buffer, data, size)) { if (copy_to_user(buffer, data, size)) {
kfree(dsdt.pointer); acpi_os_free(dsdt.pointer);
return_VALUE(-EFAULT); return_VALUE(-EFAULT);
} }
} }
kfree(dsdt.pointer); acpi_os_free(dsdt.pointer);
*ppos += size; *ppos += size;
...@@ -558,12 +549,12 @@ acpi_system_read_fadt ( ...@@ -558,12 +549,12 @@ acpi_system_read_fadt (
if (size > count) if (size > count)
size = count; size = count;
if (copy_to_user(buffer, data, size)) { if (copy_to_user(buffer, data, size)) {
kfree(fadt.pointer); acpi_os_free(fadt.pointer);
return_VALUE(-EFAULT); return_VALUE(-EFAULT);
} }
} }
kfree(fadt.pointer); acpi_os_free(fadt.pointer);
*ppos += size; *ppos += size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment