All of lore.kernel.org
 help / color / mirror / Atom feed
From: akpm@linux-foundation.org
To: lenb@kernel.org
Cc: linux-acpi@vger.kernel.org, akpm@linux-foundation.org,
	jbeulich@novell.com
Subject: [patch 05/10] acpi: use __init* on everything in tables/tbfadt.c
Date: Thu, 01 May 2008 02:52:04 -0700	[thread overview]
Message-ID: <200805010952.m419q40A031809@imap1.linux-foundation.org> (raw)

From: "Jan Beulich" <jbeulich@novell.com>

All of the code in this file is use at boot time only.

Additionally, acpi_tb_create_local_fadt() doesn't need a globally visible
declaration.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/acpi/tables/tbfadt.c |   15 +++++++++------
 include/acpi/actables.h      |    2 --
 2 files changed, 9 insertions(+), 8 deletions(-)

diff -puN drivers/acpi/tables/tbfadt.c~acpi-use-__init-on-everything-in-tables-tbfadtc drivers/acpi/tables/tbfadt.c
--- a/drivers/acpi/tables/tbfadt.c~acpi-use-__init-on-everything-in-tables-tbfadtc
+++ a/drivers/acpi/tables/tbfadt.c
@@ -52,6 +52,8 @@ static void inline
 acpi_tb_init_generic_address(struct acpi_generic_address *generic_address,
 			     u8 bit_width, u64 address);
 
+static void acpi_tb_create_local_fadt(struct acpi_table_header *, u32 length);
+
 static void acpi_tb_convert_fadt(void);
 
 static void acpi_tb_validate_fadt(void);
@@ -59,7 +61,7 @@ static void acpi_tb_validate_fadt(void);
 /* Table for conversion of FADT to common internal format and FADT validation */
 
 typedef struct acpi_fadt_info {
-	char *name;
+	const char *name;
 	u8 target;
 	u8 source;
 	u8 length;
@@ -70,7 +72,7 @@ typedef struct acpi_fadt_info {
 #define ACPI_FADT_REQUIRED          1
 #define ACPI_FADT_SEPARATE_LENGTH   2
 
-static struct acpi_fadt_info fadt_info_table[] = {
+static struct acpi_fadt_info __initdata fadt_info_table[] = {
 	{"Pm1aEventBlock", ACPI_FADT_OFFSET(xpm1a_event_block),
 	 ACPI_FADT_OFFSET(pm1a_event_block),
 	 ACPI_FADT_OFFSET(pm1_event_length), ACPI_FADT_REQUIRED},
@@ -155,7 +157,7 @@ acpi_tb_init_generic_address(struct acpi
  *
  ******************************************************************************/
 
-void acpi_tb_parse_fadt(acpi_native_uint table_index, u8 flags)
+void __init acpi_tb_parse_fadt(acpi_native_uint table_index, u8 flags)
 {
 	u32 length;
 	struct acpi_table_header *table;
@@ -215,7 +217,8 @@ void acpi_tb_parse_fadt(acpi_native_uint
  *
  ******************************************************************************/
 
-void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length)
+static void __init
+acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length)
 {
 
 	/*
@@ -276,7 +279,7 @@ void acpi_tb_create_local_fadt(struct ac
  *
  ******************************************************************************/
 
-static void acpi_tb_convert_fadt(void)
+static void __init acpi_tb_convert_fadt(void)
 {
 	u8 pm1_register_length;
 	struct acpi_generic_address *target;
@@ -397,7 +400,7 @@ static void acpi_tb_convert_fadt(void)
  *
  ******************************************************************************/
 
-static void acpi_tb_validate_fadt(void)
+static void __init acpi_tb_validate_fadt(void)
 {
 	u32 *address32;
 	struct acpi_generic_address *address64;
diff -puN include/acpi/actables.h~acpi-use-__init-on-everything-in-tables-tbfadtc include/acpi/actables.h
--- a/include/acpi/actables.h~acpi-use-__init-on-everything-in-tables-tbfadtc
+++ a/include/acpi/actables.h
@@ -51,8 +51,6 @@ acpi_status acpi_allocate_root_table(u32
  */
 void acpi_tb_parse_fadt(acpi_native_uint table_index, u8 flags);
 
-void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length);
-
 /*
  * tbfind - find ACPI table
  */
_

             reply	other threads:[~2008-05-01  9:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-01  9:52 akpm [this message]
2008-05-01 18:55 ` [patch 05/10] acpi: use __init* on everything in tables/tbfadt.c Thomas Renninger
2008-05-01 19:02   ` Thomas Renninger
2008-05-01 19:37   ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200805010952.m419q40A031809@imap1.linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=jbeulich@novell.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.