Skip to content

Commit

Permalink
ACPICA: Cleanup table handler naming conflicts.
Browse files Browse the repository at this point in the history
This is a cosmetic patch only. Comparison of the resulting binary showed
only line number differences.

This patch does not affect the generation of the Linux binary.
This patch decreases 44 lines of 20121114 divergence.diff.

There are naming conflicts between Linux and ACPICA on table handlers. This
patch cleans up this conflicts to reduce the source code diff between Linux
and ACPICA.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Lv Zheng authored and Rafael J. Wysocki committed Jan 11, 2013
1 parent 42f8fb7 commit b43e106
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ ACPI_EXTERN acpi_cache_t *acpi_gbl_operand_cache;
ACPI_EXTERN struct acpi_global_notify_handler acpi_gbl_global_notify[2];
ACPI_EXTERN acpi_exception_handler acpi_gbl_exception_handler;
ACPI_EXTERN acpi_init_handler acpi_gbl_init_handler;
ACPI_EXTERN acpi_tbl_handler acpi_gbl_table_handler;
ACPI_EXTERN acpi_table_handler acpi_gbl_table_handler;
ACPI_EXTERN void *acpi_gbl_table_handler_context;
ACPI_EXTERN struct acpi_walk_state *acpi_gbl_breakpoint_walk;
ACPI_EXTERN acpi_interface_handler acpi_gbl_interface_handler;
Expand Down
4 changes: 2 additions & 2 deletions drivers/acpi/acpica/tbxface.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_table_by_index)
*
******************************************************************************/
acpi_status
acpi_install_table_handler(acpi_tbl_handler handler, void *context)
acpi_install_table_handler(acpi_table_handler handler, void *context)
{
acpi_status status;

Expand Down Expand Up @@ -482,7 +482,7 @@ ACPI_EXPORT_SYMBOL(acpi_install_table_handler)
* DESCRIPTION: Remove table event handler
*
******************************************************************************/
acpi_status acpi_remove_table_handler(acpi_tbl_handler handler)
acpi_status acpi_remove_table_handler(acpi_table_handler handler)
{
acpi_status status;

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ static int __init acpi_parse_srat(struct acpi_table_header *table)

static int __init
acpi_table_parse_srat(enum acpi_srat_type id,
acpi_table_entry_handler handler, unsigned int max_entries)
acpi_tbl_entry_handler handler, unsigned int max_entries)
{
return acpi_table_parse_entries(ACPI_SIG_SRAT,
sizeof(struct acpi_table_srat), id,
Expand Down
6 changes: 3 additions & 3 deletions drivers/acpi/tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ int __init
acpi_table_parse_entries(char *id,
unsigned long table_size,
int entry_id,
acpi_table_entry_handler handler,
acpi_tbl_entry_handler handler,
unsigned int max_entries)
{
struct acpi_table_header *table_header = NULL;
Expand Down Expand Up @@ -269,7 +269,7 @@ acpi_table_parse_entries(char *id,

int __init
acpi_table_parse_madt(enum acpi_madt_type id,
acpi_table_entry_handler handler, unsigned int max_entries)
acpi_tbl_entry_handler handler, unsigned int max_entries)
{
return acpi_table_parse_entries(ACPI_SIG_MADT,
sizeof(struct acpi_table_madt), id,
Expand All @@ -285,7 +285,7 @@ acpi_table_parse_madt(enum acpi_madt_type id,
* Scan the ACPI System Descriptor Table (STD) for a table matching @id,
* run @handler on it. Return 0 if table found, return on if not.
*/
int __init acpi_table_parse(char *id, acpi_table_handler handler)
int __init acpi_table_parse(char *id, acpi_tbl_table_handler handler)
{
struct acpi_table_header *table = NULL;
acpi_size tbl_size;
Expand Down
4 changes: 2 additions & 2 deletions include/acpi/acpixf.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@ acpi_status
acpi_get_table_by_index(u32 table_index, struct acpi_table_header **out_table);

acpi_status
acpi_install_table_handler(acpi_tbl_handler handler, void *context);
acpi_install_table_handler(acpi_table_handler handler, void *context);

acpi_status acpi_remove_table_handler(acpi_tbl_handler handler);
acpi_status acpi_remove_table_handler(acpi_table_handler handler);

/*
* Namespace and name interfaces
Expand Down
2 changes: 1 addition & 1 deletion include/acpi/actypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ acpi_status(*acpi_exception_handler) (acpi_status aml_status,
/* Table Event handler (Load, load_table, etc.) and types */

typedef
acpi_status(*acpi_tbl_handler) (u32 event, void *table, void *context);
acpi_status(*acpi_table_handler) (u32 event, void *table, void *context);

#define ACPI_TABLE_LOAD 0x0
#define ACPI_TABLE_UNLOAD 0x1
Expand Down
15 changes: 10 additions & 5 deletions include/linux/acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ enum acpi_address_range_id {

/* Table Handlers */

typedef int (*acpi_table_handler) (struct acpi_table_header *table);
typedef int (*acpi_tbl_table_handler)(struct acpi_table_header *table);

typedef int (*acpi_table_entry_handler) (struct acpi_subtable_header *header, const unsigned long end);
typedef int (*acpi_tbl_entry_handler)(struct acpi_subtable_header *header,
const unsigned long end);

#ifdef CONFIG_ACPI_INITRD_TABLE_OVERRIDE
void acpi_initrd_override(void *data, size_t size);
Expand All @@ -95,10 +96,14 @@ int acpi_mps_check (void);
int acpi_numa_init (void);

int acpi_table_init (void);
int acpi_table_parse (char *id, acpi_table_handler handler);
int acpi_table_parse(char *id, acpi_tbl_table_handler handler);
int __init acpi_table_parse_entries(char *id, unsigned long table_size,
int entry_id, acpi_table_entry_handler handler, unsigned int max_entries);
int acpi_table_parse_madt (enum acpi_madt_type id, acpi_table_entry_handler handler, unsigned int max_entries);
int entry_id,
acpi_tbl_entry_handler handler,
unsigned int max_entries);
int acpi_table_parse_madt(enum acpi_madt_type id,
acpi_tbl_entry_handler handler,
unsigned int max_entries);
int acpi_parse_mcfg (struct acpi_table_header *header);
void acpi_table_print_madt_entry (struct acpi_subtable_header *madt);

Expand Down

0 comments on commit b43e106

Please sign in to comment.