Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751399AbcKFDTI (ORCPT ); Sat, 5 Nov 2016 23:19:08 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:42028 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750968AbcKFDTG (ORCPT ); Sat, 5 Nov 2016 23:19:06 -0400 X-ME-Sender: X-Sasl-enc: d8AAZ7R/mspleJHV8l8XenjSKrO68bprQx38+781aT8H 1478402344 Date: Sun, 6 Nov 2016 01:19:02 -0200 From: Henrique de Moraes Holschuh To: Darren Hart Cc: Lyude , ibm-acpi-devel@lists.freedesktop.org, Daniel Martin , ibm-acpi-devel@lists.sourceforge.net, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/3] thinkpad_acpi: Move tablet detection into separate function Message-ID: <20161106031901.GH17290@khazad-dum.debian.net> References: <201611010752.uqciUgvR%fengguang.wu@intel.com> <1477958200-23883-1-git-send-email-lyude@redhat.com> <20161105193022.GH100528@f23x64.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161105193022.GH100528@f23x64.localdomain> X-GPG-Fingerprint1: 4096R/0x0BD9E81139CB4807: C467 A717 507B BAFE D3C1 6092 0BD9 E811 39CB 4807 User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1282 Lines: 30 On Sat, 05 Nov 2016, Darren Hart wrote: > On Mon, Oct 31, 2016 at 07:56:40PM -0400, Lyude wrote: > > Suggested by Daniel Martin > > > > Lenovo's having a bit of fun randomly changing what hotkey events and > > acpi handles they use for reporting tablet mode, so unfortunately this > > means we're definitely going to need to probe for multiple types of > > tablet mode support. Since the hotkey_init() is already a lot larger > > then it should be, let's split up this detection into it's own function > > to make things a little easier to read. > > > > As well, since we're going to have multiple types of tablet modes, make > > hotkey_tablet into an enum so we can also use it to indicate the type of > > tablet mode reporting the machine supports. > > > > Changes since v1: > > - Don't use bool for in_tablet_mode (fixes complaints from kbuild test > > robot) > > > > This series doesn't apply cleanly now (simple fuzz). > > Once we hear back from Henrique on his enum preference and thoughts on the > refactoring (which looks reasonable to me), please resubmit this series and I don't mind the enum usage, as long as it is correct. As you said, the driver is not consistent there. I also don't mind the refactoring. -- Henrique Holschuh