OSDN Git Service

Staging: bcm: led_control.c: Replaced time selecting ifelse with ternary operator
authorMatthias Beyer <mail@beyermatthias.de>
Mon, 23 Jun 2014 19:18:27 +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 a387c6a..8a59115 100644 (file)
@@ -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,