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] [day] [month] [year] [list]
Message-ID: <20170428172803.GE4949@dtor-ws>
Date:   Fri, 28 Apr 2017 10:28:03 -0700
From:   Dmitry Torokhov <dmitry.torokhov@...il.com>
To:     Sebastian Reichel <sebastian.reichel@...labora.co.uk>
Cc:     Sebastian Reichel <sre@...nel.org>, linux-input@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] Input: twl4030-pwrbutton: Use input_set_capability()
 helper

On Fri, Apr 28, 2017 at 02:28:55PM +0200, Sebastian Reichel wrote:
> Cleanup driver slightly by using input_set_capability() instead
> of manually setting the required bits.
> 
> Signed-off-by: Sebastian Reichel <sebastian.reichel@...labora.co.uk>

Applied, thank you.

> ---
>  drivers/input/misc/twl4030-pwrbutton.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c
> index 7c4504c31b07..1c13005b228f 100644
> --- a/drivers/input/misc/twl4030-pwrbutton.c
> +++ b/drivers/input/misc/twl4030-pwrbutton.c
> @@ -64,8 +64,7 @@ static int twl4030_pwrbutton_probe(struct platform_device *pdev)
>  		return -ENOMEM;
>  	}
>  
> -	pwr->evbit[0] = BIT_MASK(EV_KEY);
> -	pwr->keybit[BIT_WORD(KEY_POWER)] = BIT_MASK(KEY_POWER);
> +	input_set_capability(pwr, EV_KEY, KEY_POWER);
>  	pwr->name = "twl4030_pwrbutton";
>  	pwr->phys = "twl4030_pwrbutton/input0";
>  	pwr->dev.parent = &pdev->dev;
> -- 
> 2.11.0
> 

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ