]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
iwl3945: remove RFKILL_STATE_HARD_BLOCKED warnings
authorZhu Yi <yi.zhu@intel.com>
Mon, 30 Jun 2008 09:23:32 +0000 (17:23 +0800)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 2 Jul 2008 19:48:33 +0000 (15:48 -0400)
The patch fixes the compile warning of "enumeration value
‘RFKILL_STATE_HARD_BLOCKED’ not handled in switch".

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl3945-base.c

index 73942a4f215e3b40515131f8c9df115ea766838a..3bc2644039f0edc34466ea4fece4c06ac8b93c71 100644 (file)
@@ -8287,17 +8287,20 @@ static int iwl3945_rfkill_soft_rf_kill(void *data, enum rfkill_state state)
        mutex_lock(&priv->mutex);
 
        switch (state) {
-       case RFKILL_STATE_ON:
+       case RFKILL_STATE_UNBLOCKED:
                iwl3945_radio_kill_sw(priv, 0);
                /* if HW rf-kill is set dont allow ON state */
                if (iwl3945_is_rfkill(priv))
                        err = -EBUSY;
                break;
-       case RFKILL_STATE_OFF:
+       case RFKILL_STATE_SOFT_BLOCKED:
                iwl3945_radio_kill_sw(priv, 1);
                if (!iwl3945_is_rfkill(priv))
                        err = -EBUSY;
                break;
+       default:
+               IWL_WARNING("we recieved unexpected RFKILL state %d\n", state);
+               break;
        }
        mutex_unlock(&priv->mutex);