From: "Pali Rohár" <pali.rohar@gmail.com>
To: Darren Hart <dvhart@infradead.org>,
Matthew Garrett <mjg59@srcf.ucam.org>,
Andy Shevchenko <andy@infradead.org>
Cc: platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org, "Pali Rohár" <pali.rohar@gmail.com>
Subject: [PATCH] dell-laptop: Use bool type in struct quirk_entry for true/false fields
Date: Sat, 11 Nov 2017 23:20:23 +0100 [thread overview]
Message-ID: <1510438823-28161-1-git-send-email-pali.rohar@gmail.com> (raw)
In struct quirk_entry some boolean fields used int, some u8 type. Change
them all to bool type.
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
---
drivers/platform/x86/dell-laptop.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
index 7424e53..de7d04b 100644
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -48,10 +48,10 @@
#define KBD_LED_AC_TOKEN 0x0451
struct quirk_entry {
- u8 touchpad_led;
- u8 kbd_led_levels_off_1;
+ bool touchpad_led;
+ bool kbd_led_levels_off_1;
- int needs_kbd_timeouts;
+ bool needs_kbd_timeouts;
/*
* Ordered list of timeouts expressed in seconds.
* The list must end with -1
@@ -62,7 +62,7 @@ struct quirk_entry {
static struct quirk_entry *quirks;
static struct quirk_entry quirk_dell_vostro_v130 = {
- .touchpad_led = 1,
+ .touchpad_led = true,
};
static int __init dmi_matched(const struct dmi_system_id *dmi)
@@ -76,12 +76,12 @@ static int __init dmi_matched(const struct dmi_system_id *dmi)
* is used then BIOS silently set timeout to 0 without any error message.
*/
static struct quirk_entry quirk_dell_xps13_9333 = {
- .needs_kbd_timeouts = 1,
+ .needs_kbd_timeouts = true,
.kbd_timeouts = { 0, 5, 15, 60, 5 * 60, 15 * 60, -1 },
};
static struct quirk_entry quirk_dell_latitude_e6410 = {
- .kbd_led_levels_off_1 = 1,
+ .kbd_led_levels_off_1 = true,
};
static struct platform_driver platform_driver = {
--
1.7.9.5
next reply other threads:[~2017-11-11 22:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-11 22:20 Pali Rohár [this message]
2017-12-08 21:41 ` [PATCH] dell-laptop: Use bool type in struct quirk_entry for true/false fields Darren Hart
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=1510438823-28161-1-git-send-email-pali.rohar@gmail.com \
--to=pali.rohar@gmail.com \
--cc=andy@infradead.org \
--cc=dvhart@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg59@srcf.ucam.org \
--cc=platform-driver-x86@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 NNTP newsgroup(s).