]> Devoid-pointer.net GitWeb - omnibook.git/commitdiff
Apply patch from Ryan Martin to clean up compiler warnings
authorJulien Valroff <julien@kirya.net>
Sun, 11 Sep 2011 05:09:03 +0000 (07:09 +0200)
committerJulien Valroff <julien@kirya.net>
Sun, 11 Sep 2011 05:09:03 +0000 (07:09 +0200)
acpi.c
ec.c
lcd.c

diff --git a/acpi.c b/acpi.c
index 7c6a86573bb3ea860bccd13b4a43622ed9dca8a4..df1d13b4838aaae79e05c82278cf6a1b8c18a904 100644 (file)
--- 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 714ce4ac0d98d1745fb2a36fd6b9e16fecae2a38..47e24c6d944e8a8650a03a3e8da13adf3cf1ac4a 100644 (file)
--- 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 e9a5c32deca5e3f0ff4c9fc2712266c2e69a21ab..85fe17cae84871c3683b075df902c93544cc0e49 100644 (file)
--- 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 =