diff options
author | Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> | 2007-03-07 14:28:00 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-03-09 23:27:28 -0500 |
commit | 3d02b90be2c7bc7ffbc5e502a135c13838d23ef4 (patch) | |
tree | f7abf826dc64642d0389e340f948b7be88b04a13 /drivers/acpi/ec.c | |
parent | c45aac43fec2d6ca8d0be8408f94e8176c8110ef (diff) |
ACPI: EC: Remove casts to/from void* from ec.c
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/ec.c')
-rw-r--r-- | drivers/acpi/ec.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index e7ce6e449424..19896311214f 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
@@ -406,7 +406,7 @@ static int acpi_ec_query(struct acpi_ec *ec, u8 * data) | |||
406 | 406 | ||
407 | static void acpi_ec_gpe_query(void *ec_cxt) | 407 | static void acpi_ec_gpe_query(void *ec_cxt) |
408 | { | 408 | { |
409 | struct acpi_ec *ec = (struct acpi_ec *)ec_cxt; | 409 | struct acpi_ec *ec = ec_cxt; |
410 | u8 value = 0; | 410 | u8 value = 0; |
411 | char object_name[8]; | 411 | char object_name[8]; |
412 | 412 | ||
@@ -424,8 +424,9 @@ static u32 acpi_ec_gpe_handler(void *data) | |||
424 | { | 424 | { |
425 | acpi_status status = AE_OK; | 425 | acpi_status status = AE_OK; |
426 | u8 value; | 426 | u8 value; |
427 | struct acpi_ec *ec = (struct acpi_ec *)data; | 427 | struct acpi_ec *ec = data; |
428 | atomic_inc(&ec->event_count); | 428 | atomic_inc(&ec->event_count); |
429 | |||
429 | if (acpi_ec_mode == EC_INTR) { | 430 | if (acpi_ec_mode == EC_INTR) { |
430 | wake_up(&ec->wait); | 431 | wake_up(&ec->wait); |
431 | } | 432 | } |
@@ -468,7 +469,7 @@ acpi_ec_space_handler(u32 function, | |||
468 | void *handler_context, void *region_context) | 469 | void *handler_context, void *region_context) |
469 | { | 470 | { |
470 | int result = 0; | 471 | int result = 0; |
471 | struct acpi_ec *ec = NULL; | 472 | struct acpi_ec *ec = handler_context; |
472 | u64 temp = *value; | 473 | u64 temp = *value; |
473 | acpi_integer f_v = 0; | 474 | acpi_integer f_v = 0; |
474 | int i = 0; | 475 | int i = 0; |
@@ -480,8 +481,6 @@ acpi_ec_space_handler(u32 function, | |||
480 | return AE_BAD_PARAMETER; | 481 | return AE_BAD_PARAMETER; |
481 | } | 482 | } |
482 | 483 | ||
483 | ec = (struct acpi_ec *)handler_context; | ||
484 | |||
485 | next_byte: | 484 | next_byte: |
486 | switch (function) { | 485 | switch (function) { |
487 | case ACPI_READ: | 486 | case ACPI_READ: |
@@ -537,7 +536,7 @@ static struct proc_dir_entry *acpi_ec_dir; | |||
537 | 536 | ||
538 | static int acpi_ec_read_info(struct seq_file *seq, void *offset) | 537 | static int acpi_ec_read_info(struct seq_file *seq, void *offset) |
539 | { | 538 | { |
540 | struct acpi_ec *ec = (struct acpi_ec *)seq->private; | 539 | struct acpi_ec *ec = seq->private; |
541 | 540 | ||
542 | if (!ec) | 541 | if (!ec) |
543 | goto end; | 542 | goto end; |
@@ -694,7 +693,7 @@ static int acpi_ec_remove(struct acpi_device *device, int type) | |||
694 | static acpi_status | 693 | static acpi_status |
695 | acpi_ec_io_ports(struct acpi_resource *resource, void *context) | 694 | acpi_ec_io_ports(struct acpi_resource *resource, void *context) |
696 | { | 695 | { |
697 | struct acpi_ec *ec = (struct acpi_ec *)context; | 696 | struct acpi_ec *ec = context; |
698 | 697 | ||
699 | if (resource->type != ACPI_RESOURCE_TYPE_IO) { | 698 | if (resource->type != ACPI_RESOURCE_TYPE_IO) { |
700 | return AE_OK; | 699 | return AE_OK; |