From patchwork Fri Jan 21 16:54:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Sampaio X-Patchwork-Id: 534084 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6FAC3C433FE for ; Fri, 21 Jan 2022 16:58:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379623AbiAUQ6K (ORCPT ); Fri, 21 Jan 2022 11:58:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380025AbiAUQzS (ORCPT ); Fri, 21 Jan 2022 11:55:18 -0500 Received: from mail-oo1-xc34.google.com (mail-oo1-xc34.google.com [IPv6:2607:f8b0:4864:20::c34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 894CBC061757; Fri, 21 Jan 2022 08:55:07 -0800 (PST) Received: by mail-oo1-xc34.google.com with SMTP id q16-20020a4a3010000000b002dde2463e66so3486183oof.9; Fri, 21 Jan 2022 08:55:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=v7u/1reZfs0BoCSFwSj+daUOVIdy7CF8lGf6AzgFwV8=; b=dUOYa3+iMqZXKhKXRcAf//V+c049D5heIy9QFjxhsiTO/lGEOqy6uNxoq+GzfKpUk5 MEZAMsqOpgmn3b+tyP42LjxdhK3iF8t2Vo9PJV+78hMvS6E3HTV7Ld+y2CpsX8SPaIbf HlpuYROwuiBADozL4lPZ89RIcJGxAjwcflh8qmkWsTTdCTv41ic03v/lliYc1q2XriGH GwCE6T/U7oYnOWM+Ikhp8+IjZYyCPw2Hev08/zkDx83ezLQHMUTJAFM9rqyesSoYtVVI lPJFfEViD7jt9X3i5Ms/4rmyT+A3W2FzIaOjMlZ5DyE6MLCt7/WNDDI08HO5NvDZ2+kt JEBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=v7u/1reZfs0BoCSFwSj+daUOVIdy7CF8lGf6AzgFwV8=; b=KwH9zXLoh8iTTSbAcdYjLFKgIVlZg4enexS2l5PTbmpABZeWkh4aOP2oDV7BjBljIT dwIoziHO3rtQOQtaG5Xsbyd9dTAb9D5JwIEEW25P8SiytOu11kV+iar1uT8kn8F2iHxh nFitbJgB2H9XRDOeOfzG+ELSXbpHRLgDFhYYnGGokll3kWD/11veNOA7UnYSoj4pfiIu VL1kK0M74Y1hNvs7zdOwAaS91YkYAvjw/ud50xE3qRkLGRrBwIarDh+jZe0c/TgB3BE8 VIuwSlQdbUcD6ojvTZfHd+odxCaj2rWjK11eCzlBsMSgz2zaj5SYktIN/m34rC6v2Zn7 xfnw== X-Gm-Message-State: AOAM533tDJbIuDrtEiZbilpJCOCb11aAlyboN2z3Ymqt52jbaI5OQdjo 8lupqaesnG+NAZleBGObGjk= X-Google-Smtp-Source: ABdhPJx7+MxuKThO+YBT6naKuMHTwYdavYAds1jlnbwFonjq9bexJ87FdRlAV6oXlywXptGdgQ1aAQ== X-Received: by 2002:a4a:e60f:: with SMTP id f15mr3106188oot.75.1642784106971; Fri, 21 Jan 2022 08:55:06 -0800 (PST) Received: from thinkpad.localdomain ([2804:14d:5cd1:5d03:cf72:4317:3105:f6e5]) by smtp.gmail.com with ESMTPSA id y8sm1089271oou.23.2022.01.21.08.55.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jan 2022 08:55:06 -0800 (PST) From: Luiz Sampaio To: Jiri Slaby , Nick Kossifidis , Luis Chamberlain , Kalle Valo , "David S. Miller" , Jakub Kicinski , ath9k-devel@qca.qualcomm.com Cc: linux-kernel@vger.kernel.org, Luiz Sampaio , linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 14/31] net: wireless: ath: changing LED_* from enum led_brightness to actual value Date: Fri, 21 Jan 2022 13:54:19 -0300 Message-Id: <20220121165436.30956-15-sampaio.ime@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220121165436.30956-1-sampaio.ime@gmail.com> References: <20220121165436.30956-1-sampaio.ime@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The enum led_brightness, which contains the declaration of LED_OFF, LED_ON, LED_HALF and LED_FULL is obsolete, as the led class now supports max_brightness. --- drivers/net/wireless/ath/ath5k/led.c | 2 +- drivers/net/wireless/ath/ath9k/gpio.c | 4 ++-- drivers/net/wireless/ath/ath9k/htc_drv_gpio.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/ath5k/led.c b/drivers/net/wireless/ath/ath5k/led.c index 33e9928af363..df3db4851bf3 100644 --- a/drivers/net/wireless/ath/ath5k/led.c +++ b/drivers/net/wireless/ath/ath5k/led.c @@ -118,7 +118,7 @@ ath5k_led_brightness_set(struct led_classdev *led_dev, struct ath5k_led *led = container_of(led_dev, struct ath5k_led, led_dev); - if (brightness == LED_OFF) + if (brightness == 0) ath5k_led_off(led->ah); else ath5k_led_on(led->ah); diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c index b457e52dd365..0828dc9d3503 100644 --- a/drivers/net/wireless/ath/ath9k/gpio.c +++ b/drivers/net/wireless/ath/ath9k/gpio.c @@ -52,7 +52,7 @@ static void ath_led_brightness(struct led_classdev *led_cdev, enum led_brightness brightness) { struct ath_softc *sc = container_of(led_cdev, struct ath_softc, led_cdev); - u32 val = (brightness == LED_OFF); + u32 val = (brightness == 0); if (sc->sc_ah->config.led_active_high) val = !val; @@ -65,7 +65,7 @@ void ath_deinit_leds(struct ath_softc *sc) if (!sc->led_registered) return; - ath_led_brightness(&sc->led_cdev, LED_OFF); + ath_led_brightness(&sc->led_cdev, 0); led_classdev_unregister(&sc->led_cdev); ath9k_hw_gpio_free(sc->sc_ah, sc->sc_ah->led_pin); diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c b/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c index ecb848b60725..7a9369f06534 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c @@ -230,7 +230,7 @@ void ath9k_led_work(struct work_struct *work) led_work); ath9k_hw_set_gpio(priv->ah, priv->ah->led_pin, - (priv->brightness == LED_OFF)); + (priv->brightness == 0)); } static void ath9k_led_brightness(struct led_classdev *led_cdev, @@ -250,7 +250,7 @@ void ath9k_deinit_leds(struct ath9k_htc_priv *priv) if (!priv->led_registered) return; - ath9k_led_brightness(&priv->led_cdev, LED_OFF); + ath9k_led_brightness(&priv->led_cdev, 0); led_classdev_unregister(&priv->led_cdev); cancel_work_sync(&priv->led_work); From patchwork Fri Jan 21 16:54:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Sampaio X-Patchwork-Id: 534468 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A294C433FE for ; Fri, 21 Jan 2022 16:57:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379238AbiAUQ46 (ORCPT ); Fri, 21 Jan 2022 11:56:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379114AbiAUQ4T (ORCPT ); Fri, 21 Jan 2022 11:56:19 -0500 Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC483C06175B; Fri, 21 Jan 2022 08:55:10 -0800 (PST) Received: by mail-oi1-x233.google.com with SMTP id bx18so14350749oib.7; Fri, 21 Jan 2022 08:55:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LECfU6cLXmTWAFEkOmILc0YJMNkX9LftVPNv4hejlLw=; b=X1kgsEpBLZffAa6n2Zpdp3hS5eepWNOv7/NvBFCUrLPcDJE7Bb4iovVZguI/81N2Va T9Izj9GCrpLlmiY3jAP7FHD32lbBBoDVYU9aFaII3Ci3mdxhCfgw18C5xGs6nhGcF1jA OB9NWxVkn+zp78jd4frB+zrngn5WDc4SokFNup+Uv+Cl+NtmNhMjTjTKDrLiztSE5swy kGcXylufL7Yg/0WuuFfpyI2wuIj6KLRC8oB27XMpp845Ykq7ovO8++bP0Mzlv8pSuFP6 QbpB8wwGNDPXycyEZV6d7lpuxftlO15tpuQ1t6nz/b2l4Yz02AUn4DgS7fqHEA6g9urH yYPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LECfU6cLXmTWAFEkOmILc0YJMNkX9LftVPNv4hejlLw=; b=Xwxs0LT0kKh0cvNKWzDoiRLlpLt2MbZUY77hFn/bVQ0IEQ3dldS6TknoPDnZrQbxsR 31ezKaA8CyirypwkfqJnT0Vz1PaNnpMQNuANEx4aun3SaQOVFDUxdXSBAPPKuT1iOslg xhbnN8yb2+erFuDsens1NHqIjIhTEbEqIMoJ9fCD8TWstkYZiVvjkC02uiJL1AVpb6GZ Z63gWclAp3Ueo2raRxl7DR+KWJx1VjoKgk9A1qIRgcucmuJeJ7BB+EwM25TVhjxaV20e MkLJHN14MZVZgA+eSuwmynLbWwQDr020h5Feuccku+JEqrAZKj3GoxCmjukjH9svM+ul Q4Fg== X-Gm-Message-State: AOAM532xs3Sb4Xz3Q5HWxC5kfESFyGOqHdtW6yHgFxu+wHxNP0D4fZb8 YFPxWWnybFkI7imPjb+ZZvg= X-Google-Smtp-Source: ABdhPJwnMTm/HRYkycV0dhiJ7DZNarIXvBbprClF5tkRMIbPP/TqgF6weELN4MPUKaK2ZtRzAyN7JQ== X-Received: by 2002:a05:6808:f13:: with SMTP id m19mr1242656oiw.123.1642784109992; Fri, 21 Jan 2022 08:55:09 -0800 (PST) Received: from thinkpad.localdomain ([2804:14d:5cd1:5d03:cf72:4317:3105:f6e5]) by smtp.gmail.com with ESMTPSA id y8sm1089271oou.23.2022.01.21.08.55.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jan 2022 08:55:09 -0800 (PST) From: Luiz Sampaio To: Kalle Valo , "David S. Miller" , Jakub Kicinski Cc: linux-kernel@vger.kernel.org, Luiz Sampaio , linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 15/31] net: wireless: atmel: changing LED_* from enum led_brightness to actual value Date: Fri, 21 Jan 2022 13:54:20 -0300 Message-Id: <20220121165436.30956-16-sampaio.ime@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220121165436.30956-1-sampaio.ime@gmail.com> References: <20220121165436.30956-1-sampaio.ime@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The enum led_brightness, which contains the declaration of LED_OFF, LED_ON, LED_HALF and LED_FULL is obsolete, as the led class now supports max_brightness. --- drivers/net/wireless/atmel/at76c50x-usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/atmel/at76c50x-usb.c b/drivers/net/wireless/atmel/at76c50x-usb.c index 7582761c61e2..3847c59b9672 100644 --- a/drivers/net/wireless/atmel/at76c50x-usb.c +++ b/drivers/net/wireless/atmel/at76c50x-usb.c @@ -523,10 +523,10 @@ static void at76_ledtrig_tx_timerfunc(struct timer_list *unused) if (tx_lastactivity != tx_activity) { tx_lastactivity = tx_activity; - led_trigger_event(ledtrig_tx, LED_FULL); + led_trigger_event(ledtrig_tx, 255); mod_timer(&ledtrig_tx_timer, jiffies + HZ / 4); } else - led_trigger_event(ledtrig_tx, LED_OFF); + led_trigger_event(ledtrig_tx, 0); } static void at76_ledtrig_tx_activity(void) From patchwork Fri Jan 21 16:54:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Sampaio X-Patchwork-Id: 534087 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1DF3C433FE for ; Fri, 21 Jan 2022 16:57:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380819AbiAUQ47 (ORCPT ); Fri, 21 Jan 2022 11:56:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379251AbiAUQ4T (ORCPT ); Fri, 21 Jan 2022 11:56:19 -0500 Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A10EC06175C; Fri, 21 Jan 2022 08:55:14 -0800 (PST) Received: by mail-ot1-x32c.google.com with SMTP id n22-20020a9d2016000000b0059bd79f7777so12086472ota.2; Fri, 21 Jan 2022 08:55:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Q356TySGpOi9cm8C15uJYgLdKIpPtBrszItNMB5sdtA=; b=d08sxUH3eK/+C4ImWey5IwRNyFJty2X4q2Fcg6n7ZHmZN9ctajF8uw1GBf1L5BH5I7 V/kKVyFpnQavgkZlPTK9Wg7ngEaOyGBjaq09IRMK1VTXfYANVnxMFNgSagNRfAPoAH+D fFY6QEbafaDPfAMdRL/B0VVisl/qar+seAQrHGkmlFelczDkuQ0RWymHEGujEWGDcOje y3S9LAVnu7DcuX+DlLtdGeeYGobgEUea6WaaNt5Zq0xv1Pwt6Gcu5v1UvbeK3I45x6SX AeuEz12eggrSCViDGacZEm47IFancwGQ4otY0iBDgahmOIf5w5EazCIq7c1CRKotuRJh eoqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Q356TySGpOi9cm8C15uJYgLdKIpPtBrszItNMB5sdtA=; b=sqCq7pT1GmeFygG2d28OyL5iaiu4ZrISrlZhZEczb7mhrfb8lBSUCgZW0jRfargdGl oiV6VLaEx/NAyI03+ZoIivfs9geh9Pn1WWvYqPBrBsLduak97hD3x7vftiyHERM5VaJQ YTm4uBaFsQWM6Si2X2umo/+fJAbkvtgpn/mfOunaxoN6hNEV4EIWgNmdOyH/3HlQJKmi Aq/byVl4mTN4seCztL2S/GLInssYO2FSfg0RElGntP8DjY4XM/hViv/HuVucRV/V11ro 6FralrpgW/gT9xlOsEEgfEoMHgadcnmI8Nv3/pp927+DpjCPkBGJwuFSZhZxo3Lf9lTI 0/HQ== X-Gm-Message-State: AOAM532ahF59RFHp0a1A+78slma53tN4kOrh1ZlTVz+ot+hiReST0Qf7 HZiXY0QA7pEieVxVccuIaZY= X-Google-Smtp-Source: ABdhPJxMLXhmV3f3kN56sohiz2YckqgwjTMJ0RtIqk/x215sI8lHLYXhQHyVMgC8DtQbU8bte5FllA== X-Received: by 2002:a05:6830:1047:: with SMTP id b7mr3285242otp.197.1642784113714; Fri, 21 Jan 2022 08:55:13 -0800 (PST) Received: from thinkpad.localdomain ([2804:14d:5cd1:5d03:cf72:4317:3105:f6e5]) by smtp.gmail.com with ESMTPSA id y8sm1089271oou.23.2022.01.21.08.55.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jan 2022 08:55:13 -0800 (PST) From: Luiz Sampaio To: Kalle Valo , "David S. Miller" , Jakub Kicinski , Larry Finger Cc: linux-kernel@vger.kernel.org, Luiz Sampaio , linux-wireless@vger.kernel.org, b43-dev@lists.infradead.org, netdev@vger.kernel.org Subject: [PATCH 16/31] net: broadcom: changing LED_* from enum led_brightness to actual value Date: Fri, 21 Jan 2022 13:54:21 -0300 Message-Id: <20220121165436.30956-17-sampaio.ime@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220121165436.30956-1-sampaio.ime@gmail.com> References: <20220121165436.30956-1-sampaio.ime@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The enum led_brightness, which contains the declaration of LED_OFF, LED_ON, LED_HALF and LED_FULL is obsolete, as the led class now supports max_brightness. --- drivers/net/wireless/broadcom/b43/leds.c | 2 +- drivers/net/wireless/broadcom/b43legacy/leds.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/broadcom/b43/leds.c b/drivers/net/wireless/broadcom/b43/leds.c index 982a772a9d87..bdb46168e019 100644 --- a/drivers/net/wireless/broadcom/b43/leds.c +++ b/drivers/net/wireless/broadcom/b43/leds.c @@ -59,7 +59,7 @@ static void b43_led_update(struct b43_wldev *dev, * with the brightness_set handler, we will be called again soon * to fixup our state. */ if (radio_enabled) - turn_on = atomic_read(&led->state) != LED_OFF; + turn_on = atomic_read(&led->state) != 0; else turn_on = false; if (turn_on == led->hw_state) diff --git a/drivers/net/wireless/broadcom/b43legacy/leds.c b/drivers/net/wireless/broadcom/b43legacy/leds.c index 38b5be3a84e2..5803d41185e7 100644 --- a/drivers/net/wireless/broadcom/b43legacy/leds.c +++ b/drivers/net/wireless/broadcom/b43legacy/leds.c @@ -66,7 +66,7 @@ static void b43legacy_led_brightness_set(struct led_classdev *led_dev, * whether the LED has the wrong state for a second. */ radio_enabled = (dev->phy.radio_on && dev->radio_hw_enable); - if (brightness == LED_OFF || !radio_enabled) + if (brightness == 0 || !radio_enabled) b43legacy_led_turn_off(dev, led->index, led->activelow); else b43legacy_led_turn_on(dev, led->index, led->activelow); From patchwork Fri Jan 21 16:54:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Sampaio X-Patchwork-Id: 534466 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 833ABC433EF for ; Fri, 21 Jan 2022 16:57:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351739AbiAUQ5n (ORCPT ); Fri, 21 Jan 2022 11:57:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379407AbiAUQ4s (ORCPT ); Fri, 21 Jan 2022 11:56:48 -0500 Received: from mail-oo1-xc2d.google.com (mail-oo1-xc2d.google.com [IPv6:2607:f8b0:4864:20::c2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC585C06173D; Fri, 21 Jan 2022 08:55:17 -0800 (PST) Received: by mail-oo1-xc2d.google.com with SMTP id q16-20020a4a3010000000b002dde2463e66so3486305oof.9; Fri, 21 Jan 2022 08:55:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IVOAJ94pJepIbpbSfUfz/TwG9KdmwHk/Cvcx+UDJ5T4=; b=pIOKSl0EpHvfWhlFljlxDebl+wxZ1lCxG5dYv20Sp2Zkx6SU2GmaD5OaTmH+Wo2MfF 6Orxsa9dl/d5YlGtUQn6m1HOLOyIOSAO6qQVimJLB+W9GPbjzEk3FMHa3mjDGT2Truk2 HsYXLEUl+oAYX+Lhq0g7gMYFELX7rOAWTZ/7Vw+kRPKCGUSe6S1JAJJpTkwSMkulTlDD Czl00JsRrGhseMk1qAXTK76Q8Sm099C/heQTp05HF2pjEgsnc7ldOiQAYgikA4F7crlq NLqhs+rqc1W0D+hQnJSBgspyxs+2VXk+cyq5GA+2lFsNPL2oXE97+Sz4RS6P9fLxw73R 4aSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IVOAJ94pJepIbpbSfUfz/TwG9KdmwHk/Cvcx+UDJ5T4=; b=qzQ4LB6X/oDw/RZKK9L7FX0tpLwsDHpUxtGYOqEyiNCxJt/cvOP2E+qoiZrJUwAkPq OUcYzjqtfM/2be1OqScRzKbaPfFqO90LnusCXYW9i1NA1+XLkZRyDxPu30vYI9drchbh doVe2/DG0rxZ4ZPZcsVsP2YnFDXtnSK7k48t249qUxVTKlOeNaVW3Dnm0gBJcvdfnZhp iFuvA46JIo6akCw4Em/b5lxJo4OvRek35bvDVIbByDqHSe900QxiHxbjpPtunmmURhAS VDfzOOOXXedrLx423w+Xkzz6vGozZC5vgMi6/lKuFlBl1kyVQ9sCXUxtGUzS7+izxMvO 7ndg== X-Gm-Message-State: AOAM530y+c6e2XHLH/33b6pMKsu/dv75CnD5+HyriRt7NIt7rX2L31/1 FN4RzsAcaH8oOAzZb+ekvOYJ/qPGBCE= X-Google-Smtp-Source: ABdhPJz8GHk+7q5boe5b4Wu0fQHWY4WMc/PaCje5B6GeKDz/SFWL8Lj2dH6TwrxPxJylQDn8286Vrg== X-Received: by 2002:a4a:d184:: with SMTP id j4mr3108067oor.20.1642784117119; Fri, 21 Jan 2022 08:55:17 -0800 (PST) Received: from thinkpad.localdomain ([2804:14d:5cd1:5d03:cf72:4317:3105:f6e5]) by smtp.gmail.com with ESMTPSA id y8sm1089271oou.23.2022.01.21.08.55.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jan 2022 08:55:16 -0800 (PST) From: Luiz Sampaio To: Christian Lamparter , Kalle Valo , "David S. Miller" , Jakub Kicinski Cc: linux-kernel@vger.kernel.org, Luiz Sampaio , linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 17/31] net: intersil: changing LED_* from enum led_brightness to actual value Date: Fri, 21 Jan 2022 13:54:22 -0300 Message-Id: <20220121165436.30956-18-sampaio.ime@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220121165436.30956-1-sampaio.ime@gmail.com> References: <20220121165436.30956-1-sampaio.ime@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The enum led_brightness, which contains the declaration of LED_OFF, LED_ON, LED_HALF and LED_FULL is obsolete, as the led class now supports max_brightness. --- drivers/net/wireless/intersil/p54/led.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intersil/p54/led.c b/drivers/net/wireless/intersil/p54/led.c index 4bc77010f9c1..c5966b32416e 100644 --- a/drivers/net/wireless/intersil/p54/led.c +++ b/drivers/net/wireless/intersil/p54/led.c @@ -43,7 +43,7 @@ static void p54_update_leds(struct work_struct *work) if (tmp < blink_delay) blink_delay = tmp; - if (priv->leds[i].led_dev.brightness == LED_OFF) + if (priv->leds[i].led_dev.brightness == 0) rerun = true; priv->leds[i].toggled = From patchwork Fri Jan 21 16:54:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Sampaio X-Patchwork-Id: 534465 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B5D9C433EF for ; Fri, 21 Jan 2022 16:57:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381997AbiAUQ55 (ORCPT ); Fri, 21 Jan 2022 11:57:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379421AbiAUQ4s (ORCPT ); Fri, 21 Jan 2022 11:56:48 -0500 Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09EEAC061401; Fri, 21 Jan 2022 08:55:22 -0800 (PST) Received: by mail-oi1-x22c.google.com with SMTP id s22so14315382oie.10; Fri, 21 Jan 2022 08:55:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9FkOQM5u5ppX0zk2cCe8h17WreOcSuyA+cCjXY4Ibok=; b=FImpVhK9ZDZtG1dz51vQYI+AlMCcxdaba/9f1CXpNApQCy38g6sYulfphRnyOrmCQa Ug2GmcTOm7WP5jTgcvWBrL46Jq1T/T0Y+ZI5YkHDKuIpBqlNdJ0eOKiLveK3OT7JcHct +oPN+9I+Nw2rWZrMaWVgrhwVMPXD+CTIeJyPtb5eUivV8wDYSv+aJoc9AOkuxwFIzOA6 /XUFpoEAwyVjwFJ/4/cvPwMunTEHZPQzDxTs6FCHQL0mL2l0v6I2JP4LDJ5g7b4TENCX 0Fi1g8vLruqjZLWCsbkQeHM8aBWg83w4iOqfR3D4utcscqfzbpJyvmp+sL0pzasfQsj/ lyag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9FkOQM5u5ppX0zk2cCe8h17WreOcSuyA+cCjXY4Ibok=; b=iRO2/J7Uq/RKupYUOJKVsG4ind1LM1RszlXbJyR5Plsb2CwHN0Zspu02DbRdbY1Vf9 Ee0d6vBsj98N7ccv8JTpQIzefbeMXRf8Dj68Iy6YideY6vDdbMyI24wVIZMLPpdB+phT V4PMR9vgUiSf1OSMR/qkjfqZgZYyZ8xgKEqNnd/0yi+Yz6DpHWm6E8Jbo0oV3EHV08gg 1OtluL/LxXP4zVQOMatrOK/m1rpl3scdWhoh8DSvNQTbS1hZ4rITsyunWCgWl3OEm42x PZ3Y6k5WkqDKHLiIc/uATsX8Kyqnb4NyGPN9O0fHfabw3ceVZ8LD4wvCqt4SPWlj1ZFi Xy0Q== X-Gm-Message-State: AOAM5335eSDZF27Lc6AJJ4JsYVh2/dlwoMG0JR00X3mIAyqk8rigydx3 uOm5t07cxGQQf4o04gyjVnc= X-Google-Smtp-Source: ABdhPJx8j5Rh7OutZLuKLTpoZF2an+JuV/Gd63EofLmY8JJ/xD3MoU6NM+EYsXzEfYtITA3o2R3p3w== X-Received: by 2002:a05:6808:11c5:: with SMTP id p5mr1269478oiv.51.1642784121430; Fri, 21 Jan 2022 08:55:21 -0800 (PST) Received: from thinkpad.localdomain ([2804:14d:5cd1:5d03:cf72:4317:3105:f6e5]) by smtp.gmail.com with ESMTPSA id y8sm1089271oou.23.2022.01.21.08.55.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jan 2022 08:55:21 -0800 (PST) From: Luiz Sampaio To: Stanislaw Gruszka , Helmut Schaa , Kalle Valo , "David S. Miller" , Jakub Kicinski Cc: linux-kernel@vger.kernel.org, Luiz Sampaio , linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 18/31] net: wireless: ralink: changing LED_* from enum led_brightness to actual value Date: Fri, 21 Jan 2022 13:54:23 -0300 Message-Id: <20220121165436.30956-19-sampaio.ime@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220121165436.30956-1-sampaio.ime@gmail.com> References: <20220121165436.30956-1-sampaio.ime@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The enum led_brightness, which contains the declaration of LED_OFF, LED_ON, LED_HALF and LED_FULL is obsolete, as the led class now supports max_brightness. --- drivers/net/wireless/ralink/rt2x00/rt2400pci.c | 2 +- drivers/net/wireless/ralink/rt2x00/rt2500pci.c | 2 +- drivers/net/wireless/ralink/rt2x00/rt2500usb.c | 2 +- drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 4 ++-- drivers/net/wireless/ralink/rt2x00/rt2x00leds.c | 16 ++++++++-------- drivers/net/wireless/ralink/rt2x00/rt61pci.c | 4 ++-- drivers/net/wireless/ralink/rt2x00/rt73usb.c | 4 ++-- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/net/wireless/ralink/rt2x00/rt2400pci.c b/drivers/net/wireless/ralink/rt2x00/rt2400pci.c index dec6ffdf07c4..d8b7f1a73267 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2400pci.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2400pci.c @@ -204,7 +204,7 @@ static void rt2400pci_brightness_set(struct led_classdev *led_cdev, { struct rt2x00_led *led = container_of(led_cdev, struct rt2x00_led, led_dev); - unsigned int enabled = brightness != LED_OFF; + unsigned int enabled = brightness != 0; u32 reg; reg = rt2x00mmio_register_read(led->rt2x00dev, LEDCSR); diff --git a/drivers/net/wireless/ralink/rt2x00/rt2500pci.c b/drivers/net/wireless/ralink/rt2x00/rt2500pci.c index 8faa0a80e73a..fe490a6382fe 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2500pci.c @@ -204,7 +204,7 @@ static void rt2500pci_brightness_set(struct led_classdev *led_cdev, { struct rt2x00_led *led = container_of(led_cdev, struct rt2x00_led, led_dev); - unsigned int enabled = brightness != LED_OFF; + unsigned int enabled = brightness != 0; u32 reg; reg = rt2x00mmio_register_read(led->rt2x00dev, LEDCSR); diff --git a/drivers/net/wireless/ralink/rt2x00/rt2500usb.c b/drivers/net/wireless/ralink/rt2x00/rt2500usb.c index bb5ed6630645..b25c32a03d99 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2500usb.c @@ -267,7 +267,7 @@ static void rt2500usb_brightness_set(struct led_classdev *led_cdev, { struct rt2x00_led *led = container_of(led_cdev, struct rt2x00_led, led_dev); - unsigned int enabled = brightness != LED_OFF; + unsigned int enabled = brightness != 0; u16 reg; reg = rt2500usb_register_read(led->rt2x00dev, MAC_CSR20); diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c index deddb0afd312..8441e6e5320a 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c @@ -1521,7 +1521,7 @@ static void rt2800_brightness_set(struct led_classdev *led_cdev, { struct rt2x00_led *led = container_of(led_cdev, struct rt2x00_led, led_dev); - unsigned int enabled = brightness != LED_OFF; + unsigned int enabled = brightness != 0; unsigned int bg_mode = (enabled && led->rt2x00dev->curr_band == NL80211_BAND_2GHZ); unsigned int polarity = @@ -1570,7 +1570,7 @@ static void rt2800_brightness_set(struct led_classdev *led_cdev, * (1 << level) - 1 */ rt2800_mcu_request(led->rt2x00dev, MCU_LED_STRENGTH, 0xff, - (1 << brightness / (LED_FULL / 6)) - 1, + (1 << brightness / (255 / 6)) - 1, polarity); } } diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00leds.c b/drivers/net/wireless/ralink/rt2x00/rt2x00leds.c index f5361d582d4e..3ef2a81aed7d 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00leds.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00leds.c @@ -52,7 +52,7 @@ void rt2x00leds_led_quality(struct rt2x00_dev *rt2x00dev, int rssi) * is going to calculate the value and might use it in a * division. */ - brightness = ((LED_FULL / 6) * rssi) + 1; + brightness = ((255 / 6) * rssi) + 1; if (brightness != led->led_dev.brightness) { led->led_dev.brightness_set(&led->led_dev, brightness); led->led_dev.brightness = brightness; @@ -61,7 +61,7 @@ void rt2x00leds_led_quality(struct rt2x00_dev *rt2x00dev, int rssi) static void rt2x00led_led_simple(struct rt2x00_led *led, bool enabled) { - unsigned int brightness = enabled ? LED_FULL : LED_OFF; + unsigned int brightness = enabled ? 255 : 0; if (!(led->flags & LED_REGISTERED)) return; @@ -96,7 +96,7 @@ static int rt2x00leds_register_led(struct rt2x00_dev *rt2x00dev, int retval; led->led_dev.name = name; - led->led_dev.brightness = LED_OFF; + led->led_dev.brightness = 0; retval = led_classdev_register(device, &led->led_dev); if (retval) { @@ -179,7 +179,7 @@ static void rt2x00leds_unregister_led(struct rt2x00_led *led) * possible yet. */ if (!(led->led_dev.flags & LED_SUSPENDED)) - led->led_dev.brightness_set(&led->led_dev, LED_OFF); + led->led_dev.brightness_set(&led->led_dev, 0); led->flags &= ~LED_REGISTERED; } @@ -199,8 +199,8 @@ static inline void rt2x00leds_suspend_led(struct rt2x00_led *led) led_classdev_suspend(&led->led_dev); /* This shouldn't be needed, but just to be safe */ - led->led_dev.brightness_set(&led->led_dev, LED_OFF); - led->led_dev.brightness = LED_OFF; + led->led_dev.brightness_set(&led->led_dev, 0); + led->led_dev.brightness = 0; } void rt2x00leds_suspend(struct rt2x00_dev *rt2x00dev) @@ -218,8 +218,8 @@ static inline void rt2x00leds_resume_led(struct rt2x00_led *led) led_classdev_resume(&led->led_dev); /* Device might have enabled the LEDS during resume */ - led->led_dev.brightness_set(&led->led_dev, LED_OFF); - led->led_dev.brightness = LED_OFF; + led->led_dev.brightness_set(&led->led_dev, 0); + led->led_dev.brightness = 0; } void rt2x00leds_resume(struct rt2x00_dev *rt2x00dev) diff --git a/drivers/net/wireless/ralink/rt2x00/rt61pci.c b/drivers/net/wireless/ralink/rt2x00/rt61pci.c index 82cfc2aadc2b..d48a7d06013c 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt61pci.c +++ b/drivers/net/wireless/ralink/rt2x00/rt61pci.c @@ -242,7 +242,7 @@ static void rt61pci_brightness_set(struct led_classdev *led_cdev, { struct rt2x00_led *led = container_of(led_cdev, struct rt2x00_led, led_dev); - unsigned int enabled = brightness != LED_OFF; + unsigned int enabled = brightness != 0; unsigned int a_mode = (enabled && led->rt2x00dev->curr_band == NL80211_BAND_5GHZ); unsigned int bg_mode = @@ -271,7 +271,7 @@ static void rt61pci_brightness_set(struct led_classdev *led_cdev, * argument into the matching level within that range. */ rt61pci_mcu_request(led->rt2x00dev, MCU_LED_STRENGTH, 0xff, - brightness / (LED_FULL / 6), 0); + brightness / (255 / 6), 0); } } diff --git a/drivers/net/wireless/ralink/rt2x00/rt73usb.c b/drivers/net/wireless/ralink/rt2x00/rt73usb.c index 5ff2c740c3ea..45b98395cf9e 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt73usb.c +++ b/drivers/net/wireless/ralink/rt2x00/rt73usb.c @@ -187,7 +187,7 @@ static void rt73usb_brightness_set(struct led_classdev *led_cdev, { struct rt2x00_led *led = container_of(led_cdev, struct rt2x00_led, led_dev); - unsigned int enabled = brightness != LED_OFF; + unsigned int enabled = brightness != 0; unsigned int a_mode = (enabled && led->rt2x00dev->curr_band == NL80211_BAND_5GHZ); unsigned int bg_mode = @@ -216,7 +216,7 @@ static void rt73usb_brightness_set(struct led_classdev *led_cdev, * argument into the matching level within that range. */ rt2x00usb_vendor_request_sw(led->rt2x00dev, USB_LED_CONTROL, - brightness / (LED_FULL / 6), + brightness / (255 / 6), led->rt2x00dev->led_mcu_reg, REGISTER_TIMEOUT); } From patchwork Fri Jan 21 16:54:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Sampaio X-Patchwork-Id: 534085 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09851C433F5 for ; Fri, 21 Jan 2022 16:57:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381936AbiAUQ5p (ORCPT ); Fri, 21 Jan 2022 11:57:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379623AbiAUQ4s (ORCPT ); Fri, 21 Jan 2022 11:56:48 -0500 Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8EF27C061747; Fri, 21 Jan 2022 08:55:25 -0800 (PST) Received: by mail-ot1-x32a.google.com with SMTP id x31-20020a056830245f00b00599111c8b20so12504870otr.7; Fri, 21 Jan 2022 08:55:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JlNCFKNGzNdKjL5cT/OHwG1B8Niqq4wld0y5z7aO8fE=; b=P3ZOxoBv55viB3dAfzKSRe+1LS/DMWgFmA6bqUxm/ovvkTeWR7NZqhHJARZwrUpfYV uAFpzChQtQvMYNxvF/wyh4OHPqWPfCq47VgxTMbA+mzmCT96pCpWnZBa03Ixea6CK5f7 g3Xcg6Y0PlXxcUVkWZi/CoU+wO7N81b5NqB7KfvZjp0AmELclzB6hax5OLTKOVulGG6Z lgOqc9YMRKttH758573dUWbIihX69VAZTXTSbwZNlq57Dr6V2KTAWzbRH8q9gdyGW900 VR5DVtQcVujUJMM10ZSPz7SGbf3C6tr9N2vjIDMDUlBgkW3HC4bxfmNHIFxq/Bwaimgt EMRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JlNCFKNGzNdKjL5cT/OHwG1B8Niqq4wld0y5z7aO8fE=; b=1qlWrfh/+87e68oCeGiBHiw22UWOyIRzE7xa3+zziEhEKbenVk7LBRFpDVQU7Ws168 LyivcYWSFqS3a1of0sfemCS+RwEB8FBm7JTJdWoD7ZT0bnCl8NGrOUwbSPtIU0NDElpp HtWmFij8RizE7KZYBwFslGhdfG1qhlAPcG/V9YYvZ/pAN2zPPBrhc96eV8HJAVLrzFFd 5hvVC7y0jEvdztKTjnlvl9K0oSI7s2ysnTqtntBNav3Uz07GAJXt15C39xLuVmupr/Ui gIwfFzpx80mKmpsuItwAfPMLSdSqh5JkuPrKTISE8pCkmWnJWLn47LcItAgbjLBtaQIS DfSA== X-Gm-Message-State: AOAM530pVEnp+zYYqqSvTXSBH95dYicEpZmSVuDNFdGQ6A3mgdWZN2eq EPAfCTYWSedEHMKCGRzc327432z8Q0I= X-Google-Smtp-Source: ABdhPJzLLejlyKQ1rc8bYS0Xd9Akuzio8gSFpnxClDl2uhTyxnM4hGeyoWTzSS5u4eKTAtH0DLZGSg== X-Received: by 2002:a05:6830:3152:: with SMTP id c18mr3444071ots.244.1642784125013; Fri, 21 Jan 2022 08:55:25 -0800 (PST) Received: from thinkpad.localdomain ([2804:14d:5cd1:5d03:cf72:4317:3105:f6e5]) by smtp.gmail.com with ESMTPSA id y8sm1089271oou.23.2022.01.21.08.55.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jan 2022 08:55:24 -0800 (PST) From: Luiz Sampaio To: Herton Ronaldo Krzesinski , Hin-Tak Leung , Larry Finger , Kalle Valo , "David S. Miller" , Jakub Kicinski Cc: linux-kernel@vger.kernel.org, Luiz Sampaio , linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 19/31] net: realtek: changing LED_* from enum led_brightness to actual value Date: Fri, 21 Jan 2022 13:54:24 -0300 Message-Id: <20220121165436.30956-20-sampaio.ime@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220121165436.30956-1-sampaio.ime@gmail.com> References: <20220121165436.30956-1-sampaio.ime@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The enum led_brightness, which contains the declaration of LED_OFF, LED_ON, LED_HALF and LED_FULL is obsolete, as the led class now supports max_brightness. --- drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c b/drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c index 49421d10e22b..6ddbdb5e3fa5 100644 --- a/drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c +++ b/drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c @@ -109,7 +109,7 @@ static void rtl8187_led_brightness_set(struct led_classdev *led_dev, return; priv = hw->priv; if (led->is_radio) { - if (brightness == LED_FULL) { + if (brightness == 255) { ieee80211_queue_delayed_work(hw, &priv->led_on, 0); radio_on = true; } else if (radio_on) { @@ -118,7 +118,7 @@ static void rtl8187_led_brightness_set(struct led_classdev *led_dev, ieee80211_queue_delayed_work(hw, &priv->led_off, 0); } } else if (radio_on) { - if (brightness == LED_OFF) { + if (brightness == 0) { ieee80211_queue_delayed_work(hw, &priv->led_off, 0); /* The LED is off for 1/20 sec - it just blinks. */ ieee80211_queue_delayed_work(hw, &priv->led_on, From patchwork Fri Jan 21 16:54:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Sampaio X-Patchwork-Id: 534086 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CACFBC433F5 for ; Fri, 21 Jan 2022 16:57:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381830AbiAUQ5W (ORCPT ); Fri, 21 Jan 2022 11:57:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380350AbiAUQ44 (ORCPT ); Fri, 21 Jan 2022 11:56:56 -0500 Received: from mail-oi1-x22a.google.com (mail-oi1-x22a.google.com [IPv6:2607:f8b0:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BE6CC061775; Fri, 21 Jan 2022 08:55:51 -0800 (PST) Received: by mail-oi1-x22a.google.com with SMTP id s9so14319296oib.11; Fri, 21 Jan 2022 08:55:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JWwCA6Os6ufO2OamoDdA1VpkWXg1qWYv/gpuXYzvEa0=; b=MjAl/2d7hFcNgyCHuaDhSHTjyebU3drd8M3jU8y2IQsqE6Okaz0WRef5nk97QClDqB dvRMz5ydDfyCVO7XtDrt7BlmMK8yIEirVQKVXa4Ab0p+oKDAgX92r7pE+hkI77CSUetS MH/DYXn1WvTkPKI+tE5gsImAWrq+f6bwAihvF9Zrbyyajq/ZWrGOG31AcvN0xvHHsQ/a 76Zbei7//5h/FF2ZDZo4d56PGsZXeyiJsEbzfQNDCrF7XS9IcXprwm/icw8/L0rshHl1 SNFx7oImgsZ6tDJvJDrHND4vFRrTq7IlAxO8d9ISxYF3yqUI1B4MhMf2hN48A52BFZM4 0oSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JWwCA6Os6ufO2OamoDdA1VpkWXg1qWYv/gpuXYzvEa0=; b=PxZNcHG/qr/KxQvSQ1Z9i/Ov/3ZWXQQV57z6Hde1O73TuAe56EUWAIHv+/D4NSLYxH gF/MOXhjuzR3vrTETsC9D3rbz9FC/IG0EswFyqKE1wnVgqT8MZxbXlh5pt7kS35q46Az hC/zNMnZmvNm5+zl4MBWgmZG1PfPxThqIUynx7fq31dWXf49PYxkjxsQre9tubgCmVwd XWN45CZ5h7TlJdOIu8XSQYIOJtDbRuYCrSVW7BtOb/Z7hZpqocefiQCkAj1q0JVz6tBq yYJwNKToy60bjwXNxee7ORLWfkAt56c1QhVd6SUTudwJ4ETv2tLm8NcBtMvEZIQChkaP LnBQ== X-Gm-Message-State: AOAM530DTZW9qPeXPJHeZmcgvj4F48d0hh8/+HtBjC8ID8AA9Xs3bUro ViGcXU20Mrstl/VKD7oQ1t0= X-Google-Smtp-Source: ABdhPJy/+XAmfEonekRvbRYH2yUx5daOlccr8uacmMOv+0HVuWMPQYm2UMLY4TsXH0dx9xykQjzivA== X-Received: by 2002:a05:6808:1442:: with SMTP id x2mr1217003oiv.166.1642784150774; Fri, 21 Jan 2022 08:55:50 -0800 (PST) Received: from thinkpad.localdomain ([2804:14d:5cd1:5d03:cf72:4317:3105:f6e5]) by smtp.gmail.com with ESMTPSA id y8sm1089271oou.23.2022.01.21.08.55.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jan 2022 08:55:50 -0800 (PST) From: Luiz Sampaio To: Johannes Berg , "David S. Miller" , Jakub Kicinski Cc: linux-kernel@vger.kernel.org, Luiz Sampaio , linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 27/31] net: mac80211 : changing LED_* from enum led_brightness to actual value Date: Fri, 21 Jan 2022 13:54:32 -0300 Message-Id: <20220121165436.30956-28-sampaio.ime@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220121165436.30956-1-sampaio.ime@gmail.com> References: <20220121165436.30956-1-sampaio.ime@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The enum led_brightness, which contains the declaration of LED_OFF, LED_ON, LED_HALF and LED_FULL is obsolete, as the led class now supports max_brightness. --- net/mac80211/led.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/net/mac80211/led.c b/net/mac80211/led.c index 6de8d0ad5497..ac36579636bb 100644 --- a/net/mac80211/led.c +++ b/net/mac80211/led.c @@ -14,9 +14,9 @@ void ieee80211_led_assoc(struct ieee80211_local *local, bool associated) if (!atomic_read(&local->assoc_led_active)) return; if (associated) - led_trigger_event(&local->assoc_led, LED_FULL); + led_trigger_event(&local->assoc_led, 255); else - led_trigger_event(&local->assoc_led, LED_OFF); + led_trigger_event(&local->assoc_led, 0); } void ieee80211_led_radio(struct ieee80211_local *local, bool enabled) @@ -24,9 +24,9 @@ void ieee80211_led_radio(struct ieee80211_local *local, bool enabled) if (!atomic_read(&local->radio_led_active)) return; if (enabled) - led_trigger_event(&local->radio_led, LED_FULL); + led_trigger_event(&local->radio_led, 255); else - led_trigger_event(&local->radio_led, LED_OFF); + led_trigger_event(&local->radio_led, 0); } void ieee80211_alloc_led_names(struct ieee80211_local *local) @@ -344,7 +344,7 @@ static void ieee80211_stop_tpt_led_trig(struct ieee80211_local *local) tpt_trig->running = false; del_timer_sync(&tpt_trig->timer); - led_trigger_event(&local->tpt_led, LED_OFF); + led_trigger_event(&local->tpt_led, 0); } void ieee80211_mod_tpt_led_trig(struct ieee80211_local *local, From patchwork Fri Jan 21 16:54:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Sampaio X-Patchwork-Id: 534467 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A666BC4332F for ; Fri, 21 Jan 2022 16:57:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379251AbiAUQ5K (ORCPT ); Fri, 21 Jan 2022 11:57:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379719AbiAUQ46 (ORCPT ); Fri, 21 Jan 2022 11:56:58 -0500 Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 092DFC061779; Fri, 21 Jan 2022 08:55:58 -0800 (PST) Received: by mail-ot1-x336.google.com with SMTP id a12-20020a0568301dcc00b005919e149b4cso12496259otj.8; Fri, 21 Jan 2022 08:55:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=si2C+vA2MagtGvM7KQVl7R4c/GkdTJnQxP83OLRcJVk=; b=UQGLTtt5LSEMTK67FS1ihHCiUCpYDCH9lpQphiGsNhgiy4hAmw4ejccESomUBNnmB/ aYQ+4LcEArvrDIG0KkSm+4Ai3oIf2AnPCZ0KVnCMpAPm6NmRJ/V03BR5V/c4yIjI3kSu sf6hDb0a5KoXclLLT2u8NhgaTaHM4G9x5Lf3cyL3IBsm9HRi8O4LZ3+tvWjCf5BpyHa6 tU4u/eRjs08GGNLHGtmpGMVnxgQAQF8uuASICG2GeIA2YhrzNxE2VccrdIUVKCESgwuU PYiTQH7jFNvJ3TyAuWIk3er2Op6E1kVZTdCJ/oh+lDvRopzfcAndcm2pPBfLGRlGJea9 iWwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=si2C+vA2MagtGvM7KQVl7R4c/GkdTJnQxP83OLRcJVk=; b=TF8vtws4ovSk2Ph1+ialGaKJTCekWhIt7+A+Ez/PYTh8h6q93Fjr9Mp8j3u4fnyglg WutzMcXr7NZ32CAFDYlDu46yNu9nQ8ZNdYlZy8w+hV3iaX+125QB0wfEYbyn5vh8xXpc eCm/iftbiEkV6AYgbxpX5R8iQhWbAVLxzzq5W/gR/r6YC7iCTR2FpG3OgDeMuuJs+iTV wUYofeQkRiK4AsglCypFopW8zvUHBbPe2w60jL3oIMWcpNhBMmzBRZYrkNrOCSF68Fvo KblIIFnMN1f+KGhzMlIJlMINIMXAdmztRHxYVWUImyqHB54ZlFp8IlV/ROsk+c/vN/+g c8sg== X-Gm-Message-State: AOAM5323k6zYq7sQm0gwr66qpBeIFkQ4sDi3Gp61XtyfYU/kbEJkSXsb UKhICewCqFVShGR7xRMSLsA= X-Google-Smtp-Source: ABdhPJx1jT0kqIhJYUFQF5ZtfKDl8S9daCIITgVVP8nCR1xY42JaZ2RR+AijgO/vDQjpBB6+OFVyIA== X-Received: by 2002:a05:6830:1047:: with SMTP id b7mr3287296otp.197.1642784157446; Fri, 21 Jan 2022 08:55:57 -0800 (PST) Received: from thinkpad.localdomain ([2804:14d:5cd1:5d03:cf72:4317:3105:f6e5]) by smtp.gmail.com with ESMTPSA id y8sm1089271oou.23.2022.01.21.08.55.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jan 2022 08:55:57 -0800 (PST) From: Luiz Sampaio To: Johannes Berg , "David S. Miller" , Jakub Kicinski Cc: linux-kernel@vger.kernel.org, Luiz Sampaio , linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 29/31] net: rfkill: changing LED_* from enum led_brightness to actual value Date: Fri, 21 Jan 2022 13:54:34 -0300 Message-Id: <20220121165436.30956-30-sampaio.ime@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220121165436.30956-1-sampaio.ime@gmail.com> References: <20220121165436.30956-1-sampaio.ime@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The enum led_brightness, which contains the declaration of LED_OFF, LED_ON, LED_HALF and LED_FULL is obsolete, as the led class now supports max_brightness. --- net/rfkill/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/rfkill/core.c b/net/rfkill/core.c index 5b1927d66f0d..68b4c3a71513 100644 --- a/net/rfkill/core.c +++ b/net/rfkill/core.c @@ -125,9 +125,9 @@ static void rfkill_led_trigger_event(struct rfkill *rfkill) trigger = &rfkill->led_trigger; if (rfkill->state & RFKILL_BLOCK_ANY) - led_trigger_event(trigger, LED_OFF); + led_trigger_event(trigger, 0); else - led_trigger_event(trigger, LED_FULL); + led_trigger_event(trigger, 255); } static int rfkill_led_trigger_activate(struct led_classdev *led) @@ -180,7 +180,7 @@ static void rfkill_global_led_trigger_worker(struct work_struct *work) mutex_lock(&rfkill_global_mutex); list_for_each_entry(rfkill, &rfkill_list, node) { if (!(rfkill->state & RFKILL_BLOCK_ANY)) { - brightness = LED_FULL; + brightness = 255; break; } } @@ -188,7 +188,7 @@ static void rfkill_global_led_trigger_worker(struct work_struct *work) led_trigger_event(&rfkill_any_led_trigger, brightness); led_trigger_event(&rfkill_none_led_trigger, - brightness == LED_OFF ? LED_FULL : LED_OFF); + brightness == 0 ? 255 : 0); } static void rfkill_global_led_trigger_event(void)