]> Devoid-pointer.net GitWeb - omnibook.git/commitdiff
* ACPI wifi/bluetooth : always use all the access methods we have
authorMathieu Bérard <mathieu.berard@crans.org>
Thu, 1 Feb 2007 13:15:40 +0000 (13:15 +0000)
committerMathieu Bérard <mathieu.berard@crans.org>
Thu, 1 Feb 2007 13:15:40 +0000 (13:15 +0000)
acpi.c

diff --git a/acpi.c b/acpi.c
index 5d0ae435488edf1e13ac2a35412f7a87fc463e90..f9117fa888f0c2497e3a9a77c31ce255833382a8 100644 (file)
--- a/acpi.c
+++ b/acpi.c
@@ -343,15 +343,16 @@ static int set_wireless_status(const struct acpi_backend_data *priv_data, unsign
 
 static int omnibook_acpi_set_wireless(const struct omnibook_operation *io_op, unsigned int state)
 {
-       int retval;
+       int retval = -ENODEV;
        struct acpi_backend_data *priv_data = io_op->backend->data;
        
+       /* First try the ANTR/ANTW methods */
        if(priv_data->has_antr_antw)
-               retval = set_wireless_status(priv_data, state);
-       else if(priv_data->bt_handle)
+               retval = set_wireless_status(priv_data, state); 
+       
+       /* Then try the bluetooth ACPI device if present */
+       if(priv_data->bt_handle)
                retval = set_bt_status(priv_data, (state & BT_STA));
-       else
-               retval = -ENODEV;
 
        return retval;
 }