From patchwork Sat Nov 11 22:20:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 10054567 X-Patchwork-Delegate: dvhart@infradead.org 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 CF3A2602B3 for ; Sat, 11 Nov 2017 22:20:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BCB852995C for ; Sat, 11 Nov 2017 22:20:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B141B29ADE; Sat, 11 Nov 2017 22:20:43 +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, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham 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 50AF12995C for ; Sat, 11 Nov 2017 22:20:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751733AbdKKWUk (ORCPT ); Sat, 11 Nov 2017 17:20:40 -0500 Received: from mail-wr0-f196.google.com ([209.85.128.196]:51221 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751905AbdKKWUj (ORCPT ); Sat, 11 Nov 2017 17:20:39 -0500 Received: by mail-wr0-f196.google.com with SMTP id j15so11359266wre.8; Sat, 11 Nov 2017 14:20:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=DqXLGmnoAO2rIlK/JhQpRAGZpJoalhA5RfU4+mR1VjU=; b=VS4pnZWQGxVVfu8R/Guye+zvlgxV0chTItWmGcJFJfJtW88fzgqrANwMLbRwLVKA8s q8yvrpNf3zhIsMHYM9VOFh6UPSPQEhxAOZAI7gbG2sdw89+qecG/ygxHUhvkTi086XMz CBAuzimYXnGu9cYg7wUWW3QECobO63QHaM0mnCMSyXrsf+lGowjjd7wQaYLxTvwargbv y3RlDEv6jqAhdUCHGw7JTqlbfg5iYdXWeg694eai7u/nNgqTfOU8eIVAgL5DDKj/TMud 4f+Wl39JrBZJeI+IIR8q4bI2NVUvjv8HueaU1nX+ZT1BLdN69t5IKrH8D+oEkKlNX6vg 4cNA== 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:mime-version :content-transfer-encoding; bh=DqXLGmnoAO2rIlK/JhQpRAGZpJoalhA5RfU4+mR1VjU=; b=kAjOenvaZ5B6fLeFE2RDtvMN7vfPhggpUanYEIyYGB2KapHk2PNztqO8SUfXcwC4Y0 9HoPLSWsMS60P0tA9fIyUjHwnLLvoGWo0taEEiTxqwfC6ldvu/v+IPRMKnh0nSygnNlk MpSTISyC1luZn7FWuPt8jpnyYCmlGBLyEyD46XHDnuAWO7+XimlJjUkhH9T4iVoKg4wR bJQ+EnUQQhOCyyjaE5ftXuFkmZxi4YJThE2s4rqr9B0Uip2aR/hHPoClPJHQY4k4Jh/5 FM4W3Z0A+j+anXCHXcvymDxIJs6wTTRgtOMAMl/xbYn1Hf5mgQg2hBbKqUi0uAgj+8gG b5Nw== X-Gm-Message-State: AJaThX4A7NxqH+eq+7uiEiUUxISVqqv32g2DEQQGiNgNeJc0bnxUK2GL 03fR9xn/pK2/QzzWKpWIj9Q= X-Google-Smtp-Source: AGs4zMZdPbDsWCcExaS0KSXF1OxyJ6M8a7UqymHhstbDK3c2paGBvj4nbYR1x0FyAvJQESg3lLgNAQ== X-Received: by 10.223.139.8 with SMTP id n8mr3138506wra.225.1510438838507; Sat, 11 Nov 2017 14:20:38 -0800 (PST) Received: from Pali-Latitude.lan (pali.kolej.mff.cuni.cz. [78.128.193.202]) by smtp.gmail.com with ESMTPSA id 69sm4027477wmp.37.2017.11.11.14.20.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Nov 2017 14:20:37 -0800 (PST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Darren Hart , Matthew Garrett , Andy Shevchenko Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Pali=20Roh=C3=A1r?= Subject: [PATCH] dell-laptop: Use bool type in struct quirk_entry for true/false fields Date: Sat, 11 Nov 2017 23:20:23 +0100 Message-Id: <1510438823-28161-1-git-send-email-pali.rohar@gmail.com> X-Mailer: git-send-email 1.7.9.5 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 In struct quirk_entry some boolean fields used int, some u8 type. Change them all to bool type. Signed-off-by: Pali Rohár --- 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 = {