diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-10-19 03:13:39 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-10-19 14:03:04 -0400 |
commit | d38a5edf812c2f715242aa20b6beb785939a0096 (patch) | |
tree | 93c79d62bf6b847a4a068ada5893b112fa84fd05 /drivers/acpi/dock.c | |
parent | ab7c13c4a5a22335b0cfc6f364ee77abed66503c (diff) |
ACPI dock: move some functions to .init.text
find_dock and find_bay are only called by dock_init which lives in
.init.text dock_add is only called by find_dock and find_bay. So all
three functions can be moved to .init.text, too.
This fixes:
WARNING: vmlinux.o(.text+0x2134b7): Section mismatch in reference from the function dock_add() to the function .init.text:platform_device_register_resndata()
The function dock_add() references
the function __init platform_device_register_resndata().
This is often because dock_add lacks a __init
annotation or the annotation of platform_device_register_resndata is wrong.
for a build with unset CONFIG_MODULES.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/dock.c')
-rw-r--r-- | drivers/acpi/dock.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index 3fe29e992be8..2b1656322ee2 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c | |||
@@ -929,7 +929,7 @@ static struct attribute_group dock_attribute_group = { | |||
929 | * allocated and initialize a new dock station device. Find all devices | 929 | * allocated and initialize a new dock station device. Find all devices |
930 | * that are on the dock station, and register for dock event notifications. | 930 | * that are on the dock station, and register for dock event notifications. |
931 | */ | 931 | */ |
932 | static int dock_add(acpi_handle handle) | 932 | static int __init dock_add(acpi_handle handle) |
933 | { | 933 | { |
934 | int ret, id; | 934 | int ret, id; |
935 | struct dock_station ds, *dock_station; | 935 | struct dock_station ds, *dock_station; |
@@ -1023,7 +1023,7 @@ static int dock_remove(struct dock_station *ds) | |||
1023 | * | 1023 | * |
1024 | * This is called by acpi_walk_namespace to look for dock stations. | 1024 | * This is called by acpi_walk_namespace to look for dock stations. |
1025 | */ | 1025 | */ |
1026 | static acpi_status | 1026 | static __init acpi_status |
1027 | find_dock(acpi_handle handle, u32 lvl, void *context, void **rv) | 1027 | find_dock(acpi_handle handle, u32 lvl, void *context, void **rv) |
1028 | { | 1028 | { |
1029 | if (is_dock(handle)) | 1029 | if (is_dock(handle)) |
@@ -1032,7 +1032,7 @@ find_dock(acpi_handle handle, u32 lvl, void *context, void **rv) | |||
1032 | return AE_OK; | 1032 | return AE_OK; |
1033 | } | 1033 | } |
1034 | 1034 | ||
1035 | static acpi_status | 1035 | static __init acpi_status |
1036 | find_bay(acpi_handle handle, u32 lvl, void *context, void **rv) | 1036 | find_bay(acpi_handle handle, u32 lvl, void *context, void **rv) |
1037 | { | 1037 | { |
1038 | /* If bay is a dock, it's already handled */ | 1038 | /* If bay is a dock, it's already handled */ |