From: "Michał Kępień" <kernel@kempniu.pl>
To: Alex Hung <alex.hung@canonical.com>,
Darren Hart <dvhart@infradead.org>,
Andy Shevchenko <andy@infradead.org>
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/4] platform/x86: intel-hid: make intel_hid_set_enable() take a boolean argument
Date: Fri, 24 Feb 2017 11:33:07 +0100 [thread overview]
Message-ID: <20170224103309.19463-3-kernel@kempniu.pl> (raw)
In-Reply-To: <20170224103309.19463-1-kernel@kempniu.pl>
As the integer value passed to intel_hid_set_enable() is always
explicitly passed and is used solely as a boolean value, make it a bool.
Signed-off-by: Michał Kępień <kernel@kempniu.pl>
---
drivers/platform/x86/intel-hid.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/platform/x86/intel-hid.c b/drivers/platform/x86/intel-hid.c
index 4d1c5eb3a96d..89d1d98e3214 100644
--- a/drivers/platform/x86/intel-hid.c
+++ b/drivers/platform/x86/intel-hid.c
@@ -77,7 +77,7 @@ struct intel_hid_priv {
struct input_dev *array;
};
-static int intel_hid_set_enable(struct device *device, int enable)
+static int intel_hid_set_enable(struct device *device, bool enable)
{
acpi_status status;
@@ -118,7 +118,7 @@ static void intel_button_array_enable(struct device *device, bool enable)
static int intel_hid_pl_suspend_handler(struct device *device)
{
- intel_hid_set_enable(device, 0);
+ intel_hid_set_enable(device, false);
intel_button_array_enable(device, false);
return 0;
@@ -126,7 +126,7 @@ static int intel_hid_pl_suspend_handler(struct device *device)
static int intel_hid_pl_resume_handler(struct device *device)
{
- intel_hid_set_enable(device, 1);
+ intel_hid_set_enable(device, true);
intel_button_array_enable(device, true);
return 0;
@@ -275,7 +275,7 @@ static int intel_hid_probe(struct platform_device *device)
goto err_remove_input;
}
- err = intel_hid_set_enable(&device->dev, 1);
+ err = intel_hid_set_enable(&device->dev, true);
if (err)
goto err_remove_notify;
@@ -306,7 +306,7 @@ static int intel_hid_remove(struct platform_device *device)
acpi_remove_notify_handler(handle, ACPI_DEVICE_NOTIFY, notify_handler);
intel_hid_input_destroy(device);
- intel_hid_set_enable(&device->dev, 0);
+ intel_hid_set_enable(&device->dev, false);
intel_button_array_enable(&device->dev, false);
/*
--
2.11.1
next prev parent reply other threads:[~2017-02-24 10:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-24 10:33 [PATCH 0/4] Improve intel-hid's self-consistency Michał Kępień
2017-02-24 10:33 ` [PATCH 1/4] platform/x86: intel-hid: simplify enabling/disabling HID events Michał Kępień
2017-02-24 10:33 ` Michał Kępień [this message]
2017-02-24 10:33 ` [PATCH 3/4] platform/x86: intel-hid: use devm_input_allocate_device() for HID events input device Michał Kępień
2017-02-24 10:33 ` [PATCH 4/4] platform/x86: intel-hid: remove redundant set_bit() call Michał Kępień
2017-03-01 23:03 ` [PATCH 0/4] Improve intel-hid's self-consistency Andy Shevchenko
2017-03-02 10:17 ` Alex Hung
2017-03-03 18:27 ` Andy Shevchenko
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=20170224103309.19463-3-kernel@kempniu.pl \
--to=kernel@kempniu.pl \
--cc=alex.hung@canonical.com \
--cc=andy@infradead.org \
--cc=dvhart@infradead.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®