b43-dev Archive mirror
 help / color / mirror / Atom feed
From: Luiz Sampaio <sampaio.ime@gmail.com>
To: Kalle Valo <kvalo@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Larry Finger <Larry.Finger@lwfinger.net>
Cc: linux-kernel@vger.kernel.org,
	Luiz Sampaio <sampaio.ime@gmail.com>,
	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	[thread overview]
Message-ID: <20220121165436.30956-17-sampaio.ime@gmail.com> (raw)
In-Reply-To: <20220121165436.30956-1-sampaio.ime@gmail.com>

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);
-- 
2.34.1


_______________________________________________
b43-dev mailing list
b43-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/b43-dev

       reply	other threads:[~2022-01-21 16:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220121165436.30956-1-sampaio.ime@gmail.com>
2022-01-21 16:54 ` Luiz Sampaio [this message]
2022-01-22  8:21   ` [PATCH 16/31] net: broadcom: changing LED_* from enum led_brightness to actual value Arend van Spriel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220121165436.30956-17-sampaio.ime@gmail.com \
    --to=sampaio.ime@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=b43-dev@lists.infradead.org \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).