From patchwork Fri Feb 24 10:33:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBLxJlwaWXFhA==?= X-Patchwork-Id: 9589875 X-Patchwork-Delegate: andy.shevchenko@gmail.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B722F6042B for ; Fri, 24 Feb 2017 10:35:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A8732287B4 for ; Fri, 24 Feb 2017 10:35:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9A7E928868; Fri, 24 Feb 2017 10:35:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C799287B4 for ; Fri, 24 Feb 2017 10:35:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751407AbdBXKeJ (ORCPT ); Fri, 24 Feb 2017 05:34:09 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:32980 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751289AbdBXKdp (ORCPT ); Fri, 24 Feb 2017 05:33:45 -0500 Received: by mail-lf0-f65.google.com with SMTP id j2so1173571lfe.0 for ; Fri, 24 Feb 2017 02:33:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kempniu.pl; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7VgbI1yjfsnyklsZopinvA8Gb6N3F9bbfnDgDViWCVA=; b=Tb225HQi0IjrAPD+l1GU6Jj5UwosEBDzQhJ8t2I2k4e+2hbLkCEUtWbDh5dnsW+cVM os+kX7JZ64yLWhuopNN3njubr8oAlMZxjQv1RgP+9I0rz8CEJfRRX/LUecgZC8HN4kPO cTnZs5nZYiPGWzhq6Lw0PhOxpXT/HC0zftBx8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7VgbI1yjfsnyklsZopinvA8Gb6N3F9bbfnDgDViWCVA=; b=E/tPeIrCIVRgZoVmnRuUYyZgUC9FDaUVtiPlTMNGSVLyHeXpzXBJnoEWxIWhc2fbzG PN6qP2VwtBoC7poiXMmbJqrZE5akU+3KyYg9p5r040aMBuqsBY1ng9xcKzvM6n67N2TW HAVM+m8kG5MbrCb3xvG09iyt2UQMpEu06GmewDSUcanohKrXtJD3U+MwyvAPI277SGZL 9yjL5NAuR3rXYsml7I3n94R/MFxf1nISmt26bnK9DGQqs0kmJE8Sk0vBLUnBPKUpFUYa wBm2vLRNLUKE6DLFAIOA8c5dZeDcUhLouzssxS+jHOQbeKGzYYYJluA6OVnpDkr6Kd2s rm+A== X-Gm-Message-State: AMke39loRsE2AejYcbFmZEYg5RW9cqoyP3I6AN6u/uvlnuVfKKuFgM5jqa9VrUDxZBWPig== X-Received: by 10.25.209.138 with SMTP id i132mr609140lfg.179.1487932396196; Fri, 24 Feb 2017 02:33:16 -0800 (PST) Received: from ozzy.nask.waw.pl ([2001:a10:160:3::3]) by smtp.googlemail.com with ESMTPSA id x26sm8678538lja.10.2017.02.24.02.33.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Feb 2017 02:33:15 -0800 (PST) From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= To: Alex Hung , Darren Hart , Andy Shevchenko 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 Message-Id: <20170224103309.19463-3-kernel@kempniu.pl> X-Mailer: git-send-email 2.11.1 In-Reply-To: <20170224103309.19463-1-kernel@kempniu.pl> References: <20170224103309.19463-1-kernel@kempniu.pl> MIME-Version: 1.0 Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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ń --- 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); /*