From: "Rafał Miłecki" <zajec5@gmail.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: "Rob Herring" <robh+dt@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"William Zhang" <william.zhang@broadcom.com>,
"Anand Gore" <anand.gore@broadcom.com>,
"Kursad Oney" <kursad.oney@broadcom.com>,
"Florian Fainelli" <f.fainelli@gmail.com>,
linux-leds@vger.kernel.org,
bcm-kernel-feedback-list@broadcom.com,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
"Rafał Miłecki" <rafal@milecki.pl>
Subject: [PATCH 3/3] leds: leds-bcm63138: get rid of LED_OFF
Date: Sun, 17 Jul 2022 14:42:48 +0200 [thread overview]
Message-ID: <20220717124248.13562-4-zajec5@gmail.com> (raw)
In-Reply-To: <20220717124248.13562-1-zajec5@gmail.com>
From: Rafał Miłecki <rafal@milecki.pl>
The whole "enum led_brightness" is marked as obsolete. Replace it with a
(non-)zero check.
Reported-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
drivers/leds/blink/leds-bcm63138.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/leds/blink/leds-bcm63138.c b/drivers/leds/blink/leds-bcm63138.c
index c083cb1332cb..2cf2761e4914 100644
--- a/drivers/leds/blink/leds-bcm63138.c
+++ b/drivers/leds/blink/leds-bcm63138.c
@@ -113,8 +113,7 @@ static void bcm63138_leds_enable_led(struct bcm63138_leds *leds,
{
u32 bit = BIT(led->pin);
- bcm63138_leds_update_bits(leds, BCM63138_SW_DATA, bit,
- value == LED_OFF ? 0 : bit);
+ bcm63138_leds_update_bits(leds, BCM63138_SW_DATA, bit, value ? bit : 0);
}
/*
--
2.34.1
next prev parent reply other threads:[~2022-07-17 12:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-17 12:42 [PATCH 0/3] leds-bcm63138: post apply/review fixes Rafał Miłecki
2022-07-17 12:42 ` [PATCH 1/3] dt-bindings: leds: leds-bcm63138: unify full stops in descriptions Rafał Miłecki
2022-07-17 12:42 ` [PATCH 2/3] leds: add help info about BCM63138 module name Rafał Miłecki
2022-07-17 12:42 ` Rafał Miłecki [this message]
2022-07-17 12:57 ` [PATCH 0/3] leds-bcm63138: post apply/review fixes Pavel Machek
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=20220717124248.13562-4-zajec5@gmail.com \
--to=zajec5@gmail.com \
--cc=anand.gore@broadcom.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kursad.oney@broadcom.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rafal@milecki.pl \
--cc=robh+dt@kernel.org \
--cc=william.zhang@broadcom.com \
/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 NNTP newsgroup(s).