[PATCH 15/15] Staging: bcm: led_control.c: Replaced nested ifs with logical AND concatenation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Matthias Beyer <mail@xxxxxxxxxxxxxxxx>
---
 drivers/staging/bcm/led_control.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/bcm/led_control.c b/drivers/staging/bcm/led_control.c
index 8e6bb6b..8353677 100644
--- a/drivers/staging/bcm/led_control.c
+++ b/drivers/staging/bcm/led_control.c
@@ -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) &&
-- 
2.0.0

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux