[PATCH 11/15] Staging: bcm: led_control.c: Replaced time selecting ifelse with ternary operator

[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 | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/bcm/led_control.c b/drivers/staging/bcm/led_control.c
index a387c6a..8a59115 100644
--- a/drivers/staging/bcm/led_control.c
+++ b/drivers/staging/bcm/led_control.c
@@ -112,10 +112,8 @@ static INT blink_in_normal_bandwidth(struct bcm_mini_adapter *ad,
 	 * Assign minimum number of blinks of
 	 * either Tx or Rx.
 	 */
-	if (*time_tx > *time_rx)
-		*time = *time_rx;
-	else
-		*time = *time_tx;
+	*time = (*time_tx > *time_rx ? *time_rx : *time_tx);
+
 	if (*time > 0) {
 		/* Blink both Tx and Rx LEDs */
 		if (LED_Blink(ad, 1 << GPIO_Num_tx, uiTxLedIndex, *timeout,
-- 
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