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
nexedi
linux
Commits
9a38f4ee
Commit
9a38f4ee
authored
Apr 05, 2009
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bjorn-initcall-cleanup' into release
parents
67dc0921
018f452e
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
80 additions
and
82 deletions
+80
-82
drivers/acpi/Makefile
drivers/acpi/Makefile
+2
-6
drivers/acpi/bus.c
drivers/acpi/bus.c
+15
-0
drivers/acpi/debug.c
drivers/acpi/debug.c
+6
-8
drivers/acpi/ec.c
drivers/acpi/ec.c
+1
-6
drivers/acpi/glue.c
drivers/acpi/glue.c
+1
-5
drivers/acpi/internal.h
drivers/acpi/internal.h
+43
-0
drivers/acpi/power.c
drivers/acpi/power.c
+1
-7
drivers/acpi/proc.c
drivers/acpi/proc.c
+1
-6
drivers/acpi/scan.c
drivers/acpi/scan.c
+3
-8
drivers/acpi/sleep.c
drivers/acpi/sleep.c
+2
-0
drivers/acpi/system.c
drivers/acpi/system.c
+2
-7
drivers/acpi/wakeup.c
drivers/acpi/wakeup.c
+3
-6
include/acpi/acpi_drivers.h
include/acpi/acpi_drivers.h
+0
-23
No files found.
drivers/acpi/Makefile
View file @
9a38f4ee
...
...
@@ -32,10 +32,8 @@ ifdef CONFIG_CPU_FREQ
processor-objs
+=
processor_perflib.o
endif
obj-y
+=
bus.o glue.o
obj-y
+=
scan.o
# Keep EC driver first. Initialization of others depend on it.
obj-y
+=
ec.o
obj-y
+=
bus.o glue.o scan.o ec.o
\
power.o system.o event.o
obj-$(CONFIG_ACPI_AC)
+=
ac.o
obj-$(CONFIG_ACPI_BATTERY)
+=
battery.o
obj-$(CONFIG_ACPI_BUTTON)
+=
button.o
...
...
@@ -51,8 +49,6 @@ obj-$(CONFIG_ACPI_PCI_SLOT) += pci_slot.o
obj-$(CONFIG_ACPI_PROCESSOR)
+=
processor.o
obj-$(CONFIG_ACPI_CONTAINER)
+=
container.o
obj-$(CONFIG_ACPI_THERMAL)
+=
thermal.o
obj-y
+=
power.o
obj-y
+=
system.o event.o
obj-$(CONFIG_ACPI_DEBUG)
+=
debug.o
obj-$(CONFIG_ACPI_NUMA)
+=
numa.o
obj-$(CONFIG_ACPI_HOTPLUG_MEMORY)
+=
acpi_memhotplug.o
...
...
drivers/acpi/bus.c
View file @
9a38f4ee
...
...
@@ -39,6 +39,8 @@
#include <acpi/acpi_bus.h>
#include <acpi/acpi_drivers.h>
#include "internal.h"
#define _COMPONENT ACPI_BUS_COMPONENT
ACPI_MODULE_NAME
(
"bus"
);
...
...
@@ -846,6 +848,7 @@ static int __init acpi_init(void)
acpi_kobj
=
NULL
;
}
init_acpi_device_notify
();
result
=
acpi_bus_init
();
if
(
!
result
)
{
...
...
@@ -860,11 +863,23 @@ static int __init acpi_init(void)
}
}
else
disable_acpi
();
if
(
acpi_disabled
)
return
result
;
/*
* If the laptop falls into the DMI check table, the power state check
* will be disabled in the course of device power transistion.
*/
dmi_check_system
(
power_nocheck_dmi_table
);
acpi_scan_init
();
acpi_ec_init
();
acpi_power_init
();
acpi_system_init
();
acpi_debug_init
();
acpi_sleep_proc_init
();
acpi_wakeup_device_init
();
return
result
;
}
...
...
drivers/acpi/debug.c
View file @
9a38f4ee
...
...
@@ -297,17 +297,15 @@ acpi_system_write_debug(struct file *file,
return
count
;
}
#endif
static
int
__init
acpi_debug_init
(
void
)
int
__init
acpi_debug_init
(
void
)
{
#ifdef CONFIG_ACPI_PROCFS
struct
proc_dir_entry
*
entry
;
int
error
=
0
;
char
*
name
;
if
(
acpi_disabled
)
return
0
;
/* 'debug_layer' [R/W] */
name
=
ACPI_SYSTEM_FILE_DEBUG_LAYER
;
entry
=
...
...
@@ -338,7 +336,7 @@ static int __init acpi_debug_init(void)
remove_proc_entry
(
ACPI_SYSTEM_FILE_DEBUG_LAYER
,
acpi_root_dir
);
error
=
-
ENODEV
;
goto
Done
;
}
subsys_initcall
(
acpi_debug_init
);
#else
return
0
;
#endif
}
drivers/acpi/ec.c
View file @
9a38f4ee
...
...
@@ -1069,13 +1069,10 @@ static struct acpi_driver acpi_ec_driver = {
},
};
static
int
__init
acpi_ec_init
(
void
)
int
__init
acpi_ec_init
(
void
)
{
int
result
=
0
;
if
(
acpi_disabled
)
return
0
;
acpi_ec_dir
=
proc_mkdir
(
ACPI_EC_CLASS
,
acpi_root_dir
);
if
(
!
acpi_ec_dir
)
return
-
ENODEV
;
...
...
@@ -1090,8 +1087,6 @@ static int __init acpi_ec_init(void)
return
result
;
}
subsys_initcall
(
acpi_ec_init
);
/* EC driver currently not unloadable */
#if 0
static void __exit acpi_ec_exit(void)
...
...
drivers/acpi/glue.c
View file @
9a38f4ee
...
...
@@ -286,10 +286,8 @@ static int acpi_platform_notify_remove(struct device *dev)
return
0
;
}
static
int
__init
init_acpi_device_notify
(
void
)
int
__init
init_acpi_device_notify
(
void
)
{
if
(
acpi_disabled
)
return
0
;
if
(
platform_notify
||
platform_notify_remove
)
{
printk
(
KERN_ERR
PREFIX
"Can't use platform_notify
\n
"
);
return
0
;
...
...
@@ -298,5 +296,3 @@ static int __init init_acpi_device_notify(void)
platform_notify_remove
=
acpi_platform_notify_remove
;
return
0
;
}
arch_initcall
(
init_acpi_device_notify
);
drivers/acpi/internal.h
0 → 100644
View file @
9a38f4ee
/* For use by Linux/ACPI infrastructure, not drivers */
int
init_acpi_device_notify
(
void
);
int
acpi_scan_init
(
void
);
int
acpi_system_init
(
void
);
#ifdef CONFIG_ACPI_DEBUG
int
acpi_debug_init
(
void
);
#else
static
inline
int
acpi_debug_init
(
void
)
{
return
0
;
}
#endif
/* --------------------------------------------------------------------------
Power Resource
-------------------------------------------------------------------------- */
int
acpi_power_init
(
void
);
int
acpi_device_sleep_wake
(
struct
acpi_device
*
dev
,
int
enable
,
int
sleep_state
,
int
dev_state
);
int
acpi_enable_wakeup_device_power
(
struct
acpi_device
*
dev
,
int
sleep_state
);
int
acpi_disable_wakeup_device_power
(
struct
acpi_device
*
dev
);
int
acpi_power_get_inferred_state
(
struct
acpi_device
*
device
);
int
acpi_power_transition
(
struct
acpi_device
*
device
,
int
state
);
extern
int
acpi_power_nocheck
;
int
acpi_wakeup_device_init
(
void
);
/* --------------------------------------------------------------------------
Embedded Controller
-------------------------------------------------------------------------- */
int
acpi_ec_init
(
void
);
int
acpi_ec_ecdt_probe
(
void
);
int
acpi_boot_ec_enable
(
void
);
/*--------------------------------------------------------------------------
Suspend/Resume
-------------------------------------------------------------------------- */
extern
int
acpi_sleep_init
(
void
);
#ifdef CONFIG_ACPI_SLEEP
int
acpi_sleep_proc_init
(
void
);
#else
static
inline
int
acpi_sleep_proc_init
(
void
)
{
return
0
;
}
#endif
drivers/acpi/power.c
View file @
9a38f4ee
...
...
@@ -773,14 +773,10 @@ static int acpi_power_resume(struct acpi_device *device)
return
0
;
}
static
int
__init
acpi_power_init
(
void
)
int
__init
acpi_power_init
(
void
)
{
int
result
=
0
;
if
(
acpi_disabled
)
return
0
;
INIT_LIST_HEAD
(
&
acpi_power_resource_list
);
acpi_power_dir
=
proc_mkdir
(
ACPI_POWER_CLASS
,
acpi_root_dir
);
...
...
@@ -795,5 +791,3 @@ static int __init acpi_power_init(void)
return
0
;
}
subsys_initcall
(
acpi_power_init
);
drivers/acpi/proc.c
View file @
9a38f4ee
...
...
@@ -496,11 +496,8 @@ static u32 rtc_handler(void *context)
}
#endif
/* HAVE_ACPI_LEGACY_ALARM */
static
int
__init
acpi_sleep_proc_init
(
void
)
int
__init
acpi_sleep_proc_init
(
void
)
{
if
(
acpi_disabled
)
return
0
;
#ifdef CONFIG_ACPI_PROCFS
/* 'sleep' [R/W] */
proc_create
(
"sleep"
,
S_IFREG
|
S_IRUGO
|
S_IWUSR
,
...
...
@@ -527,5 +524,3 @@ static int __init acpi_sleep_proc_init(void)
return
0
;
}
late_initcall
(
acpi_sleep_proc_init
);
drivers/acpi/scan.c
View file @
9a38f4ee
...
...
@@ -11,6 +11,8 @@
#include <acpi/acpi_drivers.h>
#include "internal.h"
#define _COMPONENT ACPI_BUS_COMPONENT
ACPI_MODULE_NAME
(
"scan"
);
#define STRUCT_TO_INT(s) (*((int*)&s))
...
...
@@ -1524,16 +1526,11 @@ static int acpi_bus_scan_fixed(struct acpi_device *root)
return
result
;
}
static
int
__init
acpi_scan_init
(
void
)
int
__init
acpi_scan_init
(
void
)
{
int
result
;
struct
acpi_bus_ops
ops
;
if
(
acpi_disabled
)
return
0
;
memset
(
&
ops
,
0
,
sizeof
(
ops
));
ops
.
acpi_op_add
=
1
;
ops
.
acpi_op_start
=
1
;
...
...
@@ -1566,5 +1563,3 @@ static int __init acpi_scan_init(void)
Done:
return
result
;
}
subsys_initcall
(
acpi_scan_init
);
drivers/acpi/sleep.c
View file @
9a38f4ee
...
...
@@ -21,6 +21,8 @@
#include <acpi/acpi_bus.h>
#include <acpi/acpi_drivers.h>
#include "internal.h"
#include "sleep.h"
u8
sleep_states
[
ACPI_S_STATE_COUNT
];
...
...
drivers/acpi/system.c
View file @
9a38f4ee
...
...
@@ -571,12 +571,9 @@ static int acpi_system_procfs_init(void)
}
#endif
static
int
__init
acpi_system_init
(
void
)
int
__init
acpi_system_init
(
void
)
{
int
result
=
0
;
if
(
acpi_disabled
)
return
0
;
int
result
;
result
=
acpi_system_procfs_init
();
if
(
result
)
...
...
@@ -586,5 +583,3 @@ static int __init acpi_system_init(void)
return
result
;
}
subsys_initcall
(
acpi_system_init
);
drivers/acpi/wakeup.c
View file @
9a38f4ee
...
...
@@ -8,6 +8,8 @@
#include <acpi/acpi_drivers.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include "internal.h"
#include "sleep.h"
#define _COMPONENT ACPI_SYSTEM_COMPONENT
...
...
@@ -136,13 +138,10 @@ void acpi_disable_wakeup_device(u8 sleep_state)
spin_unlock
(
&
acpi_device_lock
);
}
static
int
__init
acpi_wakeup_device_init
(
void
)
int
__init
acpi_wakeup_device_init
(
void
)
{
struct
list_head
*
node
,
*
next
;
if
(
acpi_disabled
)
return
0
;
spin_lock
(
&
acpi_device_lock
);
list_for_each_safe
(
node
,
next
,
&
acpi_wakeup_device_list
)
{
struct
acpi_device
*
dev
=
container_of
(
node
,
...
...
@@ -163,5 +162,3 @@ static int __init acpi_wakeup_device_init(void)
spin_unlock
(
&
acpi_device_lock
);
return
0
;
}
late_initcall
(
acpi_wakeup_device_init
);
include/acpi/acpi_drivers.h
View file @
9a38f4ee
...
...
@@ -98,24 +98,6 @@ int acpi_pci_bind_root(struct acpi_device *device, struct acpi_pci_id *id,
struct
pci_bus
*
pci_acpi_scan_root
(
struct
acpi_device
*
device
,
int
domain
,
int
bus
);
/* --------------------------------------------------------------------------
Power Resource
-------------------------------------------------------------------------- */
int
acpi_device_sleep_wake
(
struct
acpi_device
*
dev
,
int
enable
,
int
sleep_state
,
int
dev_state
);
int
acpi_enable_wakeup_device_power
(
struct
acpi_device
*
dev
,
int
sleep_state
);
int
acpi_disable_wakeup_device_power
(
struct
acpi_device
*
dev
);
int
acpi_power_get_inferred_state
(
struct
acpi_device
*
device
);
int
acpi_power_transition
(
struct
acpi_device
*
device
,
int
state
);
extern
int
acpi_power_nocheck
;
/* --------------------------------------------------------------------------
Embedded Controller
-------------------------------------------------------------------------- */
int
acpi_ec_ecdt_probe
(
void
);
int
acpi_boot_ec_enable
(
void
);
/* --------------------------------------------------------------------------
Processor
-------------------------------------------------------------------------- */
...
...
@@ -165,9 +147,4 @@ static inline void unregister_hotplug_dock_device(acpi_handle handle)
}
#endif
/*--------------------------------------------------------------------------
Suspend/Resume
-------------------------------------------------------------------------- */
extern
int
acpi_sleep_init
(
void
);
#endif
/*__ACPI_DRIVERS_H__*/
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