]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
Staging: bcm: led_control.c: Replaced nested ifs with logical AND concatenation
authorMatthias Beyer <mail@beyermatthias.de>
Mon, 23 Jun 2014 19:18:31 +0000 (21:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2014 01:02:14 +0000 (21:02 -0400)
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/bcm/led_control.c

index 8e6bb6b64e61f8eb8ceb31b54a463d092eb97c6b..835367780a8aa96bf4b413480750bde1901149e5 100644 (file)
@@ -630,15 +630,14 @@ static INT BcmGetGPIOPinInfo(struct bcm_mini_adapter *Adapter,
                if (((currdriverstate == NORMAL_OPERATION) ||
                        (currdriverstate == IDLEMODE_EXIT) ||
                        (currdriverstate == FW_DOWNLOAD)) &&
-                   (led_state_info->LED_Blink_State & currdriverstate)) {
-                       if (led_state_info->GPIO_Num != DISABLE_GPIO_NUM) {
-                               if (*GPIO_num_tx == DISABLE_GPIO_NUM) {
-                                       *GPIO_num_tx = led_state_info->GPIO_Num;
-                                       *uiLedTxIndex = uiIndex;
-                               } else {
-                                       *GPIO_num_rx = led_state_info->GPIO_Num;
-                                       *uiLedRxIndex = uiIndex;
-                               }
+                   (led_state_info->LED_Blink_State & currdriverstate) &&
+                   (led_state_info->GPIO_Num != DISABLE_GPIO_NUM)) {
+                       if (*GPIO_num_tx == DISABLE_GPIO_NUM) {
+                               *GPIO_num_tx = led_state_info->GPIO_Num;
+                               *uiLedTxIndex = uiIndex;
+                       } else {
+                               *GPIO_num_rx = led_state_info->GPIO_Num;
+                               *uiLedRxIndex = uiIndex;
                        }
                } else {
                        if ((led_state_info->LED_On_State & currdriverstate) &&