summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2014-06-23 21:18:27 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-06-26 21:02:14 -0400
commit8955051192efcd2cb3903997387743a52de4472a (patch)
tree4121d5823be87e93a60776957a3c2531c7482fa5
parent9c805bd9e45a6b114cbad49f1d4f666604ab6e96 (diff)
Staging: bcm: led_control.c: Replaced time selecting ifelse with ternary operator
Signed-off-by: Matthias Beyer <mail@beyermatthias.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/bcm/led_control.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/bcm/led_control.c b/drivers/staging/bcm/led_control.c
index a387c6a27b8..8a59115c24f 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,