From patchwork Tue Feb 27 21:15:36 2018 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: 10246077 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 7A92A60362 for ; Tue, 27 Feb 2018 21:17:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C88728AB5 for ; Tue, 27 Feb 2018 21:17:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 610A028AB7; Tue, 27 Feb 2018 21:17:10 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI 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 CEA3528AB5 for ; Tue, 27 Feb 2018 21:17:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751777AbeB0VRI (ORCPT ); Tue, 27 Feb 2018 16:17:08 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:38173 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752016AbeB0VPw (ORCPT ); Tue, 27 Feb 2018 16:15:52 -0500 Received: by mail-lf0-f65.google.com with SMTP id i80so374704lfg.5 for ; Tue, 27 Feb 2018 13:15:52 -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=IXACeoyZOSgy0azWZwTtrYpPaVUic6fWBXBQR6D5RQ0=; b=iuI7olwLGfSmcuqcPUx9/nRLi9oVNom36dxw2EZB35i7OlcnGkEMzO6FyOjTPA4r4I j6glJbEFF4axDHgaoBOCXh5Y75Hem6Q4NE+LxjzLIJ6MaNqQu3yF00LUvlWcYCkpQKL5 SDGHrVtOPnuP3e1sBu0RvMwuGoHeHpNHQ8Q5I= 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=IXACeoyZOSgy0azWZwTtrYpPaVUic6fWBXBQR6D5RQ0=; b=gPkK4FX9WYWoNTOUYJlz4lGk53Tk0sVvqfGDtxKiPUqqOb5AusEN0TSapc0/3Z9KAS 1FHcO7EvUTmdPAh8BPqMcrGWtS2V+lFCfov+czhZ0jfW5OrlVfeFTgswJt6KZyFEzE7p i+Wc1hKxngTHFcVzbeLUa2+k84/yrHhlDE5FvXfVjvi9Chm/cONyRgOP7besuV+zpkr5 VcO+Sq0ewSqV9FjArveOxuG1SA4lrYX/0LzvntAooujR/vbnK5E1R/GTNI1PBzx//K0C Ov4In0cWb1hm+ElvNATpPyJM8NNv0ZMJw+CJrVI9wj/KKd7N00nE95l8xIZ6LN36yVUD FiLg== X-Gm-Message-State: APf1xPAgiyebkmILcPjQTbjNXhbT0XTww3BjJZDENQvqxfkmIwuwXAin k5exnHyPDumhxWO/0rXb1GLpXA== X-Google-Smtp-Source: AG47ELuv9zf2jAhh64mNcMAIgHbHHDiHuFZ0zwscyO4yBn+9oMz3gRRuTP7iwqQ1um3r7IQVOzyGLw== X-Received: by 10.46.129.144 with SMTP id e16mr11895303ljg.94.1519766151331; Tue, 27 Feb 2018 13:15:51 -0800 (PST) Received: from kmp-mobile.hq.kempniu.pl (kmp-mobile.hq.kempniu.pl. [2001:470:64df:111::d0d7]) by smtp.googlemail.com with ESMTPSA id l5sm16288lje.58.2018.02.27.13.15.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Feb 2018 13:15:50 -0800 (PST) From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= To: Jonathan Woithe , Darren Hart , Andy Shevchenko Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/7] platform/x86: fujitsu-laptop: Rename constants defining hotkey codes Date: Tue, 27 Feb 2018 22:15:36 +0100 Message-Id: <20180227211539.5708-5-kernel@kempniu.pl> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180227211539.5708-1-kernel@kempniu.pl> References: <20180227211539.5708-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 Rename KEYx_CODE constants to EVENT_HKx, so that their names better fit the OP_GET_EVENTS operation they are used with. Signed-off-by: Michał Kępień --- drivers/platform/x86/fujitsu-laptop.c | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c index 3e824e961260..5f8c89155b51 100644 --- a/drivers/platform/x86/fujitsu-laptop.c +++ b/drivers/platform/x86/fujitsu-laptop.c @@ -120,11 +120,11 @@ #define STATE_BACKLIGHT_ON 0 /* Scancodes read from the GIRB register */ -#define KEY1_CODE 0x410 -#define KEY2_CODE 0x411 -#define KEY3_CODE 0x412 -#define KEY4_CODE 0x413 -#define KEY5_CODE 0x420 +#define EVENT_HK1 0x410 +#define EVENT_HK2 0x411 +#define EVENT_HK3 0x412 +#define EVENT_HK4 0x413 +#define EVENT_HK5 0x420 /* Hotkey ringbuffer limits */ #define MAX_HOTKEY_RINGBUFFER_SIZE 100 @@ -470,28 +470,28 @@ static void acpi_fujitsu_bl_notify(struct acpi_device *device, u32 event) /* ACPI device for hotkey handling */ static const struct key_entry keymap_default[] = { - { KE_KEY, KEY1_CODE, { KEY_PROG1 } }, - { KE_KEY, KEY2_CODE, { KEY_PROG2 } }, - { KE_KEY, KEY3_CODE, { KEY_PROG3 } }, - { KE_KEY, KEY4_CODE, { KEY_PROG4 } }, - { KE_KEY, KEY5_CODE, { KEY_RFKILL } }, + { KE_KEY, EVENT_HK1, { KEY_PROG1 } }, + { KE_KEY, EVENT_HK2, { KEY_PROG2 } }, + { KE_KEY, EVENT_HK3, { KEY_PROG3 } }, + { KE_KEY, EVENT_HK4, { KEY_PROG4 } }, + { KE_KEY, EVENT_HK5, { KEY_RFKILL } }, { KE_KEY, BIT(26), { KEY_TOUCHPAD_TOGGLE } }, { KE_END, 0 } }; static const struct key_entry keymap_s64x0[] = { - { KE_KEY, KEY1_CODE, { KEY_SCREENLOCK } }, /* "Lock" */ - { KE_KEY, KEY2_CODE, { KEY_HELP } }, /* "Mobility Center */ - { KE_KEY, KEY3_CODE, { KEY_PROG3 } }, - { KE_KEY, KEY4_CODE, { KEY_PROG4 } }, + { KE_KEY, EVENT_HK1, { KEY_SCREENLOCK } }, /* "Lock" */ + { KE_KEY, EVENT_HK2, { KEY_HELP } }, /* "Mobility Center */ + { KE_KEY, EVENT_HK3, { KEY_PROG3 } }, + { KE_KEY, EVENT_HK4, { KEY_PROG4 } }, { KE_END, 0 } }; static const struct key_entry keymap_p8010[] = { - { KE_KEY, KEY1_CODE, { KEY_HELP } }, /* "Support" */ - { KE_KEY, KEY2_CODE, { KEY_PROG2 } }, - { KE_KEY, KEY3_CODE, { KEY_SWITCHVIDEOMODE } }, /* "Presentation" */ - { KE_KEY, KEY4_CODE, { KEY_WWW } }, /* "WWW" */ + { KE_KEY, EVENT_HK1, { KEY_HELP } }, /* "Support" */ + { KE_KEY, EVENT_HK2, { KEY_PROG2 } }, + { KE_KEY, EVENT_HK3, { KEY_SWITCHVIDEOMODE } }, /* "Presentation" */ + { KE_KEY, EVENT_HK4, { KEY_WWW } }, /* "WWW" */ { KE_END, 0 } };