From patchwork Wed Sep 9 17:25:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Azael Avalos X-Patchwork-Id: 7147731 Return-Path: X-Original-To: patchwork-platform-driver-x86@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D7134BEEC1 for ; Wed, 9 Sep 2015 17:25:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 08E7920990 for ; Wed, 9 Sep 2015 17:25:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 258062098E for ; Wed, 9 Sep 2015 17:25:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753756AbbIIRZv (ORCPT ); Wed, 9 Sep 2015 13:25:51 -0400 Received: from mail-ob0-f181.google.com ([209.85.214.181]:34087 "EHLO mail-ob0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753371AbbIIRZu (ORCPT ); Wed, 9 Sep 2015 13:25:50 -0400 Received: by obbda8 with SMTP id da8so13705425obb.1; Wed, 09 Sep 2015 10:25:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=FqFNOcf/PGT98CN2Hhe5XZfGOEnsUHKEgUyz8OYNLTY=; b=FbcGeZmiAYUTkTUKl5THHAENxIaFpHqUgk/qRIP0gDU3FVtFKcDzOlYDgCbb/wX0EW ZEBIAuRqXMJ3I4UtmjtE9ckjQdASbzBs+FOAqsOwkUw9QD5AzRDFRIL0JTzXFDcdAJa2 ZfVK4QGFE5k8RwbNb61qTYR3h+4Pq+9/EZPq4aIgJRxrF05Wo9y7BlIsogh7aRMtbFAt cafKvdNWtuft/iYHkSOVHNTSm4r+WHxTG0ct4pVu255khj0rvPNEw/2xeOECsGm3REKv uizfMzIKiyLGB1ftwWaC/4VtGIXcOnW5ZzeELQp8I8YmCeRXj7nLDviI3ZIr8wXl9qgd 358w== X-Received: by 10.60.60.135 with SMTP id h7mr15573942oer.34.1441819550164; Wed, 09 Sep 2015 10:25:50 -0700 (PDT) Received: from Shakuras.scurra.org ([148.210.109.33]) by smtp.gmail.com with ESMTPSA id l5sm4412241oey.5.2015.09.09.10.25.48 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 09 Sep 2015 10:25:49 -0700 (PDT) From: Azael Avalos To: Darren Hart , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Azael Avalos Subject: [PATCH] toshiba_acpi: Fix USB Sleep and Music always disabled Date: Wed, 9 Sep 2015 11:25:44 -0600 Message-Id: <1441819545-11619-1-git-send-email-coproscefalo@gmail.com> X-Mailer: git-send-email 2.5.1 Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit e1a949c1b988 ("toshiba_acpi: Refactor *{get, set} functions return value") made changes on the return type of the HCI/SCI functions, but a typo on the USB Sleep and Music code is always reporting non existent support for such feature. This patch corrects the typo, changing an assignment to a comparison, making the laptops with actual support for such feature to work again. Signed-off-by: Azael Avalos --- Darren, Hopefully this patch can go into one of the 4.3 RCs, as the changes are there and to avoid shipping a broken feature support. drivers/platform/x86/toshiba_acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c index 6740c51..c434b53 100644 --- a/drivers/platform/x86/toshiba_acpi.c +++ b/drivers/platform/x86/toshiba_acpi.c @@ -938,7 +938,7 @@ static int toshiba_usb_sleep_music_get(struct toshiba_acpi_dev *dev, u32 *state) else if (result == TOS_NOT_SUPPORTED) return -ENODEV; - return result = TOS_SUCCESS ? 0 : -EIO; + return result == TOS_SUCCESS ? 0 : -EIO; } static int toshiba_usb_sleep_music_set(struct toshiba_acpi_dev *dev, u32 state)