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:   Tue, 28 Jun 2022 22:07:18 -0700
From:   Dmitry Torokhov <dmitry.torokhov@...il.com>
To:     Dario Binacchi <dario.binacchi@...rulasolutions.com>
Cc:     linux-kernel@...r.kernel.org,
        Michael Trimarchi <michael@...rulasolutions.com>,
        Oliver Graute <oliver.graute@...oconnector.com>,
        Marco Felsch <m.felsch@...gutronix.de>,
        linux-input@...r.kernel.org
Subject: Re: [RESEND PATCH v4 4/6] Input: edt-ft5x06 - show model name by
 sysfs

Hi Dario,

On Tue, Jun 21, 2022 at 02:39:35PM +0200, Dario Binacchi wrote:
> The model name was printed only if debug mode was enabled. Now you can
> always get it from sysfs.
> 
> Co-developed-by: Michael Trimarchi <michael@...rulasolutions.com>
> Signed-off-by: Michael Trimarchi <michael@...rulasolutions.com>
> Signed-off-by: Dario Binacchi <dario.binacchi@...rulasolutions.com>
> Acked-by: Oliver Graute <oliver.graute@...oconnector.com>
> ---
> 
> (no changes since v1)
> 
>  drivers/input/touchscreen/edt-ft5x06.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
> index 843e8b0522f7..89157deebfcb 100644
> --- a/drivers/input/touchscreen/edt-ft5x06.c
> +++ b/drivers/input/touchscreen/edt-ft5x06.c
> @@ -529,6 +529,17 @@ static EDT_ATTR(threshold, S_IWUSR | S_IRUGO, WORK_REGISTER_THRESHOLD,
>  static EDT_ATTR(report_rate, S_IWUSR | S_IRUGO, WORK_REGISTER_REPORT_RATE,
>  		M12_REGISTER_REPORT_RATE, NO_REGISTER, 0, 255);
>  
> +static ssize_t model_show(struct device *dev, struct device_attribute *attr,
> +			  char *buf)
> +{
> +	struct i2c_client *client = to_i2c_client(dev);
> +	struct edt_ft5x06_ts_data *tsdata = i2c_get_clientdata(client);
> +
> +	return scnprintf(buf, PAGE_SIZE, "%s\n", tsdata->name);

There is sysfs_emit() that is preferred to be used in sysfs handlers.
Same comment applies to the patches following this one.

I made the change and applied.

Thanks.

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ