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: <YFenUUP5RDRaAzvP@google.com>
Date:   Sun, 21 Mar 2021 13:06:41 -0700
From:   Dmitry Torokhov <dmitry.torokhov@...il.com>
To:     Alistair Francis <alistair@...stair23.me>
Cc:     linux-input@...r.kernel.org, linux-imx@....com,
        kernel@...gutronix.de, linux-kernel@...r.kernel.org,
        alistair23@...il.com
Subject: Re: [PATCH v3 3/9] Input: wacom_i2c - Add device tree support to
 wacom_i2c

Hi Alistair,

On Sun, Mar 21, 2021 at 10:10:43AM -0400, Alistair Francis wrote:
> Allow the wacom-i2c device to be exposed via device tree.
> 
> Signed-off-by: Alistair Francis <alistair@...stair23.me>
> ---
>  drivers/input/touchscreen/wacom_i2c.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/input/touchscreen/wacom_i2c.c b/drivers/input/touchscreen/wacom_i2c.c
> index 1afc6bde2891..fc0bf583d33b 100644
> --- a/drivers/input/touchscreen/wacom_i2c.c
> +++ b/drivers/input/touchscreen/wacom_i2c.c
> @@ -12,6 +12,7 @@
>  #include <linux/slab.h>
>  #include <linux/irq.h>
>  #include <linux/interrupt.h>
> +#include <linux/of.h>
>  #include <asm/unaligned.h>
>  
>  #define WACOM_CMD_QUERY0	0x04
> @@ -262,10 +263,17 @@ static const struct i2c_device_id wacom_i2c_id[] = {
>  };
>  MODULE_DEVICE_TABLE(i2c, wacom_i2c_id);
>  
> +static const struct of_device_id wacom_i2c_of_match_table[] __maybe_unused = {
> +	{ .compatible = "wacom,generic" },
> +	{}
> +};
> +MODULE_DEVICE_TABLE(of, wacom_i2c_of_match_table);
> +
>  static struct i2c_driver wacom_i2c_driver = {
>  	.driver	= {
>  		.name	= "wacom_i2c",
>  		.pm	= &wacom_i2c_pm,
> +		.of_match_table = of_match_ptr(wacom_i2c_of_match_table),

You need to either guard wacom_i2c_of_match_table by #ifdef CONFIG_OF or
drop of_match_ptr() and assign directly as otherwise you will get
"unused variable" warning.

Thanks.

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ