Re: [PATCH v2 1/3] thinkpad_acpi: Move tablet detection into separate function

From: Henrique de Moraes Holschuh
Date: Sat Nov 05 2016 - 23:19:11 EST


On Sat, 05 Nov 2016, Darren Hart wrote:
> On Mon, Oct 31, 2016 at 07:56:40PM -0400, Lyude wrote:
> > Suggested by Daniel Martin <consume.noise@xxxxxxxxx>
> >
> > 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