[PATCH] thinkpad-acpi: Fix build on !CONFIG_THINKPAD_ACPI_HOTKEY_POLL

From: Ingo Molnar
Date: Sun Sep 27 2009 - 03:47:46 EST


This build error:

drivers/platform/x86/thinkpad_acpi.c: In function 'tpacpi_hotkey_driver_mask_set':
drivers/platform/x86/thinkpad_acpi.c:2238: error: lvalue required as left operand of assignment

Triggers because in the !CONFIG_THINKPAD_ACPI_HOTKEY_POLL case
tpacpi_hotkey_driver_mask_set ymbol is defined to a constant
literal - which is not an lvalue so cannot be assigned to.

The whole tpacpi_hotkey_driver_mask_set() function is not used
in the !CONFIG_THINKPAD_ACPI_HOTKEY_POLL, so enclose it with
an #ifdef.

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
drivers/platform/x86/thinkpad_acpi.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 3910f2f..a52dbc9 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -2216,6 +2216,7 @@ static int hotkey_user_mask_set(const u32 mask)
return rc;
}

+#ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL
/*
* Sets the driver hotkey mask.
*
@@ -2244,6 +2245,7 @@ static int tpacpi_hotkey_driver_mask_set(const u32 mask)

return rc;
}
+#endif

static int hotkey_status_get(int *status)
{
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/