提交 2d2ea216 编写于 作者: M Matthias Beyer 提交者: Greg Kroah-Hartman

Staging: bcm: led_control.c: Replaced member accessing by variable

Signed-off-by: NMatthias Beyer <mail@beyermatthias.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 76a60d57
...@@ -587,6 +587,7 @@ static VOID LedGpioInit(struct bcm_mini_adapter *Adapter) ...@@ -587,6 +587,7 @@ static VOID LedGpioInit(struct bcm_mini_adapter *Adapter)
{ {
UINT uiResetValue = 0; UINT uiResetValue = 0;
UINT uiIndex = 0; UINT uiIndex = 0;
struct bcm_led_state_info *curr_led_state;
/* Set all LED GPIO Mode to output mode */ /* Set all LED GPIO Mode to output mode */
if (rdmalt(Adapter, GPIO_MODE_REGISTER, &uiResetValue, if (rdmalt(Adapter, GPIO_MODE_REGISTER, &uiResetValue,
...@@ -594,12 +595,13 @@ static VOID LedGpioInit(struct bcm_mini_adapter *Adapter) ...@@ -594,12 +595,13 @@ static VOID LedGpioInit(struct bcm_mini_adapter *Adapter)
BCM_DEBUG_PRINT (Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO, BCM_DEBUG_PRINT (Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO,
DBG_LVL_ALL, "LED Thread: RDM Failed\n"); DBG_LVL_ALL, "LED Thread: RDM Failed\n");
for (uiIndex = 0; uiIndex < NUM_OF_LEDS; uiIndex++) { for (uiIndex = 0; uiIndex < NUM_OF_LEDS; uiIndex++) {
if (Adapter->LEDInfo.LEDState[uiIndex].GPIO_Num != curr_led_state = &Adapter->LEDInfo.LEDState[uiIndex];
DISABLE_GPIO_NUM)
uiResetValue |= (1 << Adapter->LEDInfo.LEDState[uiIndex].GPIO_Num); if (curr_led_state->GPIO_Num != DISABLE_GPIO_NUM)
TURN_OFF_LED(Adapter, uiResetValue |= (1 << curr_led_state->GPIO_Num);
1 << Adapter->LEDInfo.LEDState[uiIndex].GPIO_Num,
uiIndex); TURN_OFF_LED(Adapter, 1 << curr_led_state->GPIO_Num, uiIndex);
} }
if (wrmalt(Adapter, GPIO_MODE_REGISTER, &uiResetValue, if (wrmalt(Adapter, GPIO_MODE_REGISTER, &uiResetValue,
sizeof(uiResetValue)) < 0) sizeof(uiResetValue)) < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册