From: Azael Avalos <coproscefalo@gmail.com>
To: Darren Hart <dvhart@infradead.org>,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Azael Avalos <coproscefalo@gmail.com>
Subject: [PATCH 3/6] toshiba_bluetooth: Clean toshiba_bluetooth_enable function
Date: Mon, 27 Apr 2015 14:32:47 -0600 [thread overview]
Message-ID: <1430166770-15060-4-git-send-email-coproscefalo@gmail.com> (raw)
In-Reply-To: <1430166770-15060-1-git-send-email-coproscefalo@gmail.com>
This patch removes unneeded code from the toshiba_bluetooth_enable
function as propper rfkill code as been added now.
Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
---
drivers/platform/x86/toshiba_bluetooth.c | 27 ---------------------------
1 file changed, 27 deletions(-)
diff --git a/drivers/platform/x86/toshiba_bluetooth.c b/drivers/platform/x86/toshiba_bluetooth.c
index a3b2d38..875ff6c 100644
--- a/drivers/platform/x86/toshiba_bluetooth.c
+++ b/drivers/platform/x86/toshiba_bluetooth.c
@@ -107,33 +107,6 @@ static int toshiba_bluetooth_status(acpi_handle handle)
static int toshiba_bluetooth_enable(acpi_handle handle)
{
acpi_status result;
- bool killswitch;
- bool powered;
- bool plugged;
- int status;
-
- /*
- * Query ACPI to verify RFKill switch is set to 'on'.
- * If not, we return silently, no need to report it as
- * an error.
- */
- status = toshiba_bluetooth_status(handle);
- if (status < 0)
- return status;
-
- killswitch = (status & BT_KILLSWITCH_MASK) ? true : false;
- powered = (status & BT_POWER_MASK) ? true : false;
- plugged = (status & BT_PLUGGED_MASK) ? true : false;
-
- if (!killswitch)
- return 0;
- /*
- * This check ensures to only enable the device if it is powered
- * off or detached, as some recent devices somehow pass the killswitch
- * test, causing a loop enabling/disabling the device, see bug 93911.
- */
- if (powered || plugged)
- return 0;
result = acpi_evaluate_object(handle, "AUSB", NULL, NULL);
if (ACPI_FAILURE(result)) {
--
2.3.5
next prev parent reply other threads:[~2015-04-27 20:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-27 20:32 [PATCH 0/6] toshiba_bluetooth: Add rfkill code to driver Azael Avalos
2015-04-27 20:32 ` [PATCH 1/6] toshiba_bluetooth: Add a container struct named toshiba_bluetooth_dev Azael Avalos
2015-04-27 20:32 ` [PATCH 2/6] toshiba_bluetooth: Add RFKill handler functions Azael Avalos
2015-04-27 20:32 ` Azael Avalos [this message]
2015-05-03 19:43 ` [PATCH 3/6] toshiba_bluetooth: Clean toshiba_bluetooth_enable function Darren Hart
2015-04-27 20:32 ` [PATCH 4/6] toshiba_bluetooth: Adapt *_notify and *_resume functions to rfkill Azael Avalos
2015-04-27 20:32 ` [PATCH 5/6] toshiba_bluetooth: Change BT status message to debug Azael Avalos
2015-04-28 7:36 ` Bjørn Mork
2015-04-28 15:08 ` Azael Avalos
2015-04-28 15:16 ` Bjørn Mork
2015-05-03 19:49 ` Darren Hart
2015-04-27 20:32 ` [PATCH 6/6] platform/x86: Add RFKILL dependency to toshiba_bluetooth driver Azael Avalos
2015-05-03 19:47 ` 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=1430166770-15060-4-git-send-email-coproscefalo@gmail.com \
--to=coproscefalo@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).