diff options
author | Pavel Machek <pavel@suse.cz> | 2008-09-22 17:37:34 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-10-10 18:05:53 -0400 |
commit | db89b4f0dbab837d0f3de2c3e9427a8d5393afa3 (patch) | |
tree | e664a0af46cb02d91c699015268d4fa10a6ce190 /drivers/acpi/ec.c | |
parent | 9e113e0014204bfb44a2baa29b2a141ede41b074 (diff) |
ACPI: catch calls of acpi_driver_data on pointer of wrong type
Catch attempts to use of acpi_driver_data on pointers of wrong type.
akpm: rewritten to use proper C typechecking and remove the
"function"-used-as-lvalue thing.
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/ec.c')
-rw-r--r-- | drivers/acpi/ec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 13593f9f2197..5741d99d6034 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
@@ -788,7 +788,7 @@ static int acpi_ec_add(struct acpi_device *device) | |||
788 | 788 | ||
789 | if (!first_ec) | 789 | if (!first_ec) |
790 | first_ec = ec; | 790 | first_ec = ec; |
791 | acpi_driver_data(device) = ec; | 791 | device->driver_data = ec; |
792 | acpi_ec_add_fs(device); | 792 | acpi_ec_add_fs(device); |
793 | pr_info(PREFIX "GPE = 0x%lx, I/O: command/status = 0x%lx, data = 0x%lx\n", | 793 | pr_info(PREFIX "GPE = 0x%lx, I/O: command/status = 0x%lx, data = 0x%lx\n", |
794 | ec->gpe, ec->command_addr, ec->data_addr); | 794 | ec->gpe, ec->command_addr, ec->data_addr); |
@@ -813,7 +813,7 @@ static int acpi_ec_remove(struct acpi_device *device, int type) | |||
813 | } | 813 | } |
814 | mutex_unlock(&ec->lock); | 814 | mutex_unlock(&ec->lock); |
815 | acpi_ec_remove_fs(device); | 815 | acpi_ec_remove_fs(device); |
816 | acpi_driver_data(device) = NULL; | 816 | device->driver_data = NULL; |
817 | if (ec == first_ec) | 817 | if (ec == first_ec) |
818 | first_ec = NULL; | 818 | first_ec = NULL; |
819 | kfree(ec); | 819 | kfree(ec); |