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]
Date:   Wed, 19 Jul 2017 20:22:02 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     htejun@...il.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 6/7] Input: synaptics_rmi4 - use
 devm_device_add_group() for attributes in F01

On 07/19/2017 05:24 PM, Dmitry Torokhov wrote:
> Now that we have proper managed API to create device attributes, let's
> start using it instead of the manual unwinding.
> 
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@...il.com>

Reviewed-by: Guenter Roeck <linux@...ck-us.net>

> ---
>   drivers/input/rmi4/rmi_f01.c | 11 +++--------
>   1 file changed, 3 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/input/rmi4/rmi_f01.c b/drivers/input/rmi4/rmi_f01.c
> index aa1aabfdbe7c..ae966e333a2f 100644
> --- a/drivers/input/rmi4/rmi_f01.c
> +++ b/drivers/input/rmi4/rmi_f01.c
> @@ -570,18 +570,14 @@ static int rmi_f01_probe(struct rmi_function *fn)
>   
>   	dev_set_drvdata(&fn->dev, f01);
>   
> -	error = sysfs_create_group(&fn->rmi_dev->dev.kobj, &rmi_f01_attr_group);
> +	error = devm_device_add_group(&fn->rmi_dev->dev, &rmi_f01_attr_group);
>   	if (error)
> -		dev_warn(&fn->dev, "Failed to create sysfs group: %d\n", error);
> +		dev_warn(&fn->dev,
> +			 "Failed to create attribute group: %d\n", error);
>   
>   	return 0;
>   }
>   
> -static void rmi_f01_remove(struct rmi_function *fn)
> -{
> -	sysfs_remove_group(&fn->rmi_dev->dev.kobj, &rmi_f01_attr_group);
> -}
> -
>   static int rmi_f01_config(struct rmi_function *fn)
>   {
>   	struct f01_data *f01 = dev_get_drvdata(&fn->dev);
> @@ -721,7 +717,6 @@ struct rmi_function_handler rmi_f01_handler = {
>   	},
>   	.func		= 0x01,
>   	.probe		= rmi_f01_probe,
> -	.remove		= rmi_f01_remove,
>   	.config		= rmi_f01_config,
>   	.attention	= rmi_f01_attention,
>   	.suspend	= rmi_f01_suspend,
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ