diff options
| author | Rashika <rashika.kheria@gmail.com> | 2013-12-17 04:32:14 -0500 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-01-05 18:13:23 -0500 |
| commit | b8a0b0d199307eca0e99c30a06c9ed85a7f49678 (patch) | |
| tree | 49dbbb5ee863e68d5f90a3e04a5996ae6b8840ad | |
| parent | 3f9eed5c044743e781d7d76202666f346cf3e757 (diff) | |
ACPI / EC: Remove unused functions and add prototype declaration in internal.h
Adds the prototype declarations of functions acpi_ec_add_query_handler()
and acpi_ec_remove_query_handler() in header file internal.h and removes
unused functions ec_burst_enable() and ec_burst_disable() in ec.c.
This eliminates the following warnings in ec.c:
drivers/acpi/ec.c:393:5: warning: no previous prototype for ‘ec_burst_enable’ [-Wmissing-prototypes]
drivers/acpi/ec.c:402:5: warning: no previous prototype for ‘ec_burst_disable’ [-Wmissing-prototypes]
drivers/acpi/ec.c:531:5: warning: no previous prototype for ‘acpi_ec_add_query_handler’ [-Wmissing-prototypes]
drivers/acpi/ec.c:552:6: warning: no previous prototype for ‘acpi_ec_remove_query_handler’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| -rw-r--r-- | drivers/acpi/ec.c | 25 | ||||
| -rw-r--r-- | drivers/acpi/internal.h | 9 |
2 files changed, 9 insertions, 25 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index ff40120e930e..47b1111afc90 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
| @@ -90,10 +90,6 @@ static unsigned int ec_storm_threshold __read_mostly = 8; | |||
| 90 | module_param(ec_storm_threshold, uint, 0644); | 90 | module_param(ec_storm_threshold, uint, 0644); |
| 91 | MODULE_PARM_DESC(ec_storm_threshold, "Maxim false GPE numbers not considered as GPE storm"); | 91 | MODULE_PARM_DESC(ec_storm_threshold, "Maxim false GPE numbers not considered as GPE storm"); |
| 92 | 92 | ||
| 93 | /* If we find an EC via the ECDT, we need to keep a ptr to its context */ | ||
| 94 | /* External interfaces use first EC only, so remember */ | ||
| 95 | typedef int (*acpi_ec_query_func) (void *data); | ||
| 96 | |||
| 97 | struct acpi_ec_query_handler { | 93 | struct acpi_ec_query_handler { |
| 98 | struct list_head node; | 94 | struct list_head node; |
| 99 | acpi_ec_query_func func; | 95 | acpi_ec_query_func func; |
| @@ -386,27 +382,6 @@ static int acpi_ec_write(struct acpi_ec *ec, u8 address, u8 data) | |||
| 386 | return acpi_ec_transaction(ec, &t); | 382 | return acpi_ec_transaction(ec, &t); |
| 387 | } | 383 | } |
| 388 | 384 | ||
| 389 | /* | ||
| 390 | * Externally callable EC access functions. For now, assume 1 EC only | ||
| 391 | */ | ||
| 392 | int ec_burst_enable(void) | ||
| 393 | { | ||
| 394 | if (!first_ec) | ||
| 395 | return -ENODEV; | ||
| 396 | return acpi_ec_burst_enable(first_ec); | ||
| 397 | } | ||
| 398 | |||
| 399 | EXPORT_SYMBOL(ec_burst_enable); | ||
| 400 | |||
| 401 | int ec_burst_disable(void) | ||
| 402 | { | ||
| 403 | if (!first_ec) | ||
| 404 | return -ENODEV; | ||
| 405 | return acpi_ec_burst_disable(first_ec); | ||
| 406 | } | ||
| 407 | |||
| 408 | EXPORT_SYMBOL(ec_burst_disable); | ||
| 409 | |||
| 410 | int ec_read(u8 addr, u8 *val) | 385 | int ec_read(u8 addr, u8 *val) |
| 411 | { | 386 | { |
| 412 | int err; | 387 | int err; |
diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h index a29739c0ba79..8ef9787dead4 100644 --- a/drivers/acpi/internal.h +++ b/drivers/acpi/internal.h | |||
| @@ -127,12 +127,21 @@ struct acpi_ec { | |||
| 127 | 127 | ||
| 128 | extern struct acpi_ec *first_ec; | 128 | extern struct acpi_ec *first_ec; |
| 129 | 129 | ||
| 130 | /* If we find an EC via the ECDT, we need to keep a ptr to its context */ | ||
| 131 | /* External interfaces use first EC only, so remember */ | ||
| 132 | typedef int (*acpi_ec_query_func) (void *data); | ||
| 133 | |||
| 130 | int acpi_ec_init(void); | 134 | int acpi_ec_init(void); |
| 131 | int acpi_ec_ecdt_probe(void); | 135 | int acpi_ec_ecdt_probe(void); |
| 132 | int acpi_boot_ec_enable(void); | 136 | int acpi_boot_ec_enable(void); |
| 133 | void acpi_ec_block_transactions(void); | 137 | void acpi_ec_block_transactions(void); |
| 134 | void acpi_ec_unblock_transactions(void); | 138 | void acpi_ec_unblock_transactions(void); |
| 135 | void acpi_ec_unblock_transactions_early(void); | 139 | void acpi_ec_unblock_transactions_early(void); |
| 140 | int acpi_ec_add_query_handler(struct acpi_ec *ec, u8 query_bit, | ||
| 141 | acpi_handle handle, acpi_ec_query_func func, | ||
| 142 | void *data); | ||
| 143 | void acpi_ec_remove_query_handler(struct acpi_ec *ec, u8 query_bit); | ||
| 144 | |||
| 136 | 145 | ||
| 137 | /*-------------------------------------------------------------------------- | 146 | /*-------------------------------------------------------------------------- |
| 138 | Suspend/Resume | 147 | Suspend/Resume |
