提交 bdf408ec 编写于 作者: H Hubert Tarasiuk 提交者: Emmanuel Grumbach

iwlwifi: dvm: handle zero brightness for wifi LED

In order to have the LED being OFF constantly when the
brightness is set to 0, we need to pass IWL_LED_SOLID to
iwl_led_cmd as the off parameter, otherwise the led will
stay on constantly.

This fixes
https://bugzilla.kernel.org/show_bug.cgi?id=110551Signed-off-by: NHubert Tarasiuk <hubert.tarasiuk@gmail.com>
[reworked the commit message]
Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
上级 15ffd075
......@@ -152,11 +152,14 @@ static void iwl_led_brightness_set(struct led_classdev *led_cdev,
{
struct iwl_priv *priv = container_of(led_cdev, struct iwl_priv, led);
unsigned long on = 0;
unsigned long off = 0;
if (brightness > 0)
on = IWL_LED_SOLID;
else
off = IWL_LED_SOLID;
iwl_led_cmd(priv, on, 0);
iwl_led_cmd(priv, on, off);
}
static int iwl_led_blink_set(struct led_classdev *led_cdev,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册