Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
60109b52
Commit
60109b52
authored
Jul 09, 2002
by
Andy Grover
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove #ifdef HANE_NEW_DEVICE_MODEL because we always have it
parent
68c70278
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
19 deletions
+10
-19
drivers/acpi/system.c
drivers/acpi/system.c
+10
-19
No files found.
drivers/acpi/system.c
View file @
60109b52
/*
/*
* 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
))
{
k
free
(
dsdt
.
pointer
);
acpi_os_
free
(
dsdt
.
pointer
);
return_VALUE
(
-
EFAULT
);
return_VALUE
(
-
EFAULT
);
}
}
}
}
k
free
(
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
))
{
k
free
(
fadt
.
pointer
);
acpi_os_
free
(
fadt
.
pointer
);
return_VALUE
(
-
EFAULT
);
return_VALUE
(
-
EFAULT
);
}
}
}
}
k
free
(
fadt
.
pointer
);
acpi_os_
free
(
fadt
.
pointer
);
*
ppos
+=
size
;
*
ppos
+=
size
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment