From 4e1e3fcdef0946247a1e9a151b0a6cf2e35e804f Mon Sep 17 00:00:00 2001 From: Julien Valroff Date: Sun, 11 Sep 2011 07:09:03 +0200 Subject: [PATCH] Apply patch from Ryan Martin to clean up compiler warnings --- acpi.c | 8 +++++--- ec.c | 2 +- lcd.c | 4 +++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/acpi.c b/acpi.c index 7c6a865..df1d13b 100644 --- a/acpi.c +++ b/acpi.c @@ -758,11 +758,11 @@ static int set_tsx205_wireless_status(const struct acpi_backend_data *priv_data, { int retval; int raw_state = !!(state & WIFI_STA); + u32 in[HCI_WORDS] = { HCI_SET, HCI_RF_CONTROL, raw_state, HCI_WIRELESS_POWER, 0, 0 }; + u32 out[HCI_WORDS]; dprintk("set_wireless raw_state: %x\n", raw_state); - u32 in[HCI_WORDS] = { HCI_SET, HCI_RF_CONTROL, raw_state, HCI_WIRELESS_POWER, 0, 0 }; - u32 out[HCI_WORDS]; hci_raw(in, out); raw_state |= !!(state & BT_STA) << 0x1; /* bit 1 */ @@ -1011,10 +1011,12 @@ static int omnibook_hci_set_hotkeys(const struct omnibook_operation *io_op, unsi { u32 in[HCI_WORDS] = { 0, 0, 0, 0, 0, 0 }; u32 out[HCI_WORDS]; + acpi_status status; in[0] = HCI_SET; in[1] = HCI_HOTKEY_EVENT; in[2] = (state & HKEY_FN) ? 1 : 0; - acpi_status status = hci_raw(in, out); + + status = hci_raw(in, out); dprintk("set_hotkeys (Fn interface) raw_state: %x\n", in[2]); diff --git a/ec.c b/ec.c index 714ce4a..47e24c6 100644 --- a/ec.c +++ b/ec.c @@ -169,7 +169,7 @@ static int omnibook_ec_display(const struct omnibook_operation *io_op, unsigned if (retval < 0) return retval; - *state = !!(raw_state) & DISPLAY_CRT_DET; + *state = !!(raw_state & DISPLAY_CRT_DET); return DISPLAY_CRT_DET; } diff --git a/lcd.c b/lcd.c index e9a5c32..85fe17c 100644 --- a/lcd.c +++ b/lcd.c @@ -33,6 +33,9 @@ static struct backlight_device *omnibook_backlight_device; static int omnibook_get_backlight(struct backlight_device *bd); static int omnibook_set_backlight(struct backlight_device *bd); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34) +static struct backlight_properties props; +#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21) static struct backlight_ops omnibookbl_ops = { #else /* 2.6.21 */ @@ -147,7 +150,6 @@ static int __init omnibook_brightness_init(struct omnibook_operation *io_op) #ifdef CONFIG_OMNIBOOK_BACKLIGHT #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34) - struct backlight_properties props; memset (&props, 0, sizeof(struct backlight_properties)); props.max_brightness = omnibook_max_brightness; omnibook_backlight_device = -- 2.43.5