lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180118154408.eyke3dtn6zlcqphi@pali>
Date:   Thu, 18 Jan 2018 16:44:08 +0100
From:   Pali Rohár <pali.rohar@...il.com>
To:     Marco Martin <notmart@...il.com>
Cc:     linux-kernel@...r.kernel.org, mjg59@...f.ucam.org,
        dvhart@...radead.org, andy@...radead.org, bhush94@...il.com,
        platform-driver-x86@...r.kernel.org
Subject: Re: [PATCH] Support tablet mode switch for Dell laptops

On Thursday 18 January 2018 14:59:50 Marco Martin wrote:
> -	if (!sparse_keymap_report_event(priv->input_dev, event, 1, true))
> +	if (event == 0xCC) {
> +		input_report_switch(priv->input_dev, SW_TABLET_MODE, 1);
> +		input_sync(priv->input_dev);
> +	} else if (event == 0xCD) {
> +		input_report_switch(priv->input_dev, SW_TABLET_MODE, 0);
> +		input_sync(priv->input_dev);
> +	} else if (!sparse_keymap_report_event(priv->input_dev, event, 1, true))

Is not it possible to put 0xCC and 0xCD into sparse keymap table?
Because IIRC sparse keymap was created just to avoid that big
if-elseif-elseif-else blocks.

>  		dev_info(&device->dev, "unknown event index 0x%x\n",
>  			 event);
>  }

-- 
Pali Rohár
pali.rohar@...il.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ