From: Matthias Beyer Date: Mon, 23 Jun 2014 19:18:30 +0000 (+0200) Subject: Staging: bcm: led_control.c: Replaced member accessing by variable X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2d2ea21655aa69c9b7a6da76888f899b20ce9f66;p=linux-beck.git Staging: bcm: led_control.c: Replaced member accessing by variable Signed-off-by: Matthias Beyer Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/bcm/led_control.c b/drivers/staging/bcm/led_control.c index 4077972c9383..8e6bb6b64e61 100644 --- a/drivers/staging/bcm/led_control.c +++ b/drivers/staging/bcm/led_control.c @@ -587,6 +587,7 @@ static VOID LedGpioInit(struct bcm_mini_adapter *Adapter) { UINT uiResetValue = 0; UINT uiIndex = 0; + struct bcm_led_state_info *curr_led_state; /* Set all LED GPIO Mode to output mode */ if (rdmalt(Adapter, GPIO_MODE_REGISTER, &uiResetValue, @@ -594,12 +595,13 @@ static VOID LedGpioInit(struct bcm_mini_adapter *Adapter) BCM_DEBUG_PRINT (Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO, DBG_LVL_ALL, "LED Thread: RDM Failed\n"); for (uiIndex = 0; uiIndex < NUM_OF_LEDS; uiIndex++) { - if (Adapter->LEDInfo.LEDState[uiIndex].GPIO_Num != - DISABLE_GPIO_NUM) - uiResetValue |= (1 << Adapter->LEDInfo.LEDState[uiIndex].GPIO_Num); - TURN_OFF_LED(Adapter, - 1 << Adapter->LEDInfo.LEDState[uiIndex].GPIO_Num, - uiIndex); + curr_led_state = &Adapter->LEDInfo.LEDState[uiIndex]; + + if (curr_led_state->GPIO_Num != DISABLE_GPIO_NUM) + uiResetValue |= (1 << curr_led_state->GPIO_Num); + + TURN_OFF_LED(Adapter, 1 << curr_led_state->GPIO_Num, uiIndex); + } if (wrmalt(Adapter, GPIO_MODE_REGISTER, &uiResetValue, sizeof(uiResetValue)) < 0)