From: Thomas Zimmermann <tzimmermann@suse.de>
To: bonbons@linux-vserver.org, jikos@kernel.org, bentiss@kernel.org
Cc: linux-input@vger.kernel.org, Thomas Zimmermann <tzimmermann@suse.de>
Subject: [PATCH] HID: picoLCD: Use backlight power constants
Date: Wed, 31 Jul 2024 15:09:50 +0200 [thread overview]
Message-ID: <20240731131017.1149175-1-tzimmermann@suse.de> (raw)
Replace FB_BLANK_ constants with their counterparts from the
backlight subsystem. The values are identical, so there's no
change in functionality or semantics.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/hid/hid-picolcd_backlight.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/hid/hid-picolcd_backlight.c b/drivers/hid/hid-picolcd_backlight.c
index 08d16917eb60..4b43b64537a3 100644
--- a/drivers/hid/hid-picolcd_backlight.c
+++ b/drivers/hid/hid-picolcd_backlight.c
@@ -31,7 +31,8 @@ static int picolcd_set_brightness(struct backlight_device *bdev)
data->lcd_brightness = bdev->props.brightness & 0x0ff;
data->lcd_power = bdev->props.power;
spin_lock_irqsave(&data->lock, flags);
- hid_set_field(report->field[0], 0, data->lcd_power == FB_BLANK_UNBLANK ? data->lcd_brightness : 0);
+ hid_set_field(report->field[0], 0,
+ data->lcd_power == BACKLIGHT_POWER_ON ? data->lcd_brightness : 0);
if (!(data->status & PICOLCD_FAILED))
hid_hw_request(data->hdev, report, HID_REQ_SET_REPORT);
spin_unlock_irqrestore(&data->lock, flags);
@@ -94,7 +95,7 @@ void picolcd_suspend_backlight(struct picolcd_data *data)
if (!data->backlight)
return;
- data->backlight->props.power = FB_BLANK_POWERDOWN;
+ data->backlight->props.power = BACKLIGHT_POWER_OFF;
picolcd_set_brightness(data->backlight);
data->lcd_power = data->backlight->props.power = bl_power;
}
--
2.45.2
next reply other threads:[~2024-07-31 13:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-31 13:09 Thomas Zimmermann [this message]
2024-09-05 8:55 ` [PATCH] HID: picoLCD: Use backlight power constants Jiri Kosina
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=20240731131017.1149175-1-tzimmermann@suse.de \
--to=tzimmermann@suse.de \
--cc=bentiss@kernel.org \
--cc=bonbons@linux-vserver.org \
--cc=jikos@kernel.org \
--cc=linux-input@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