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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200726133058.0b1f43b9@archlinux>
Date:   Sun, 26 Jul 2020 13:30:58 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     Alexandru Ardelean <alexandru.ardelean@...log.com>
Cc:     <linux-iio@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        Stefan Popa <stefan.popa@...log.com>
Subject: Re: [PATCH v2] iio: adxl372_i2c: Add OF device ID table

On Wed, 22 Jul 2020 10:30:03 +0300
Alexandru Ardelean <alexandru.ardelean@...log.com> wrote:

> From: Stefan Popa <stefan.popa@...log.com>
> 
> The driver does not have a struct of_device_id table, but supported
> devices are registered via Device Trees. This patch adds OF device ID
> table.
> 
> Signed-off-by: Stefan Popa <stefan.popa@...log.com>
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@...log.com>
Applied.

Thanks,

Jonathan

> ---
> 
> Changelog v1 -> v2:
> * use linux/mod_devicetable.h include instead for the OF table
> * remove comma from null terminator
> 
>  drivers/iio/accel/adxl372_i2c.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/iio/accel/adxl372_i2c.c b/drivers/iio/accel/adxl372_i2c.c
> index e1affe480c77..9a07ab3d151a 100644
> --- a/drivers/iio/accel/adxl372_i2c.c
> +++ b/drivers/iio/accel/adxl372_i2c.c
> @@ -6,6 +6,7 @@
>   */
>  
>  #include <linux/i2c.h>
> +#include <linux/mod_devicetable.h>
>  #include <linux/module.h>
>  #include <linux/regmap.h>
>  
> @@ -46,9 +47,16 @@ static const struct i2c_device_id adxl372_i2c_id[] = {
>  };
>  MODULE_DEVICE_TABLE(i2c, adxl372_i2c_id);
>  
> +static const struct of_device_id adxl372_of_match[] = {
> +	{ .compatible = "adi,adxl372" },
> +	{ }
> +};
> +MODULE_DEVICE_TABLE(of, adxl372_of_match);
> +
>  static struct i2c_driver adxl372_i2c_driver = {
>  	.driver = {
>  		.name = "adxl372_i2c",
> +		.of_match_table = adxl372_of_match,
>  	},
>  	.probe = adxl372_i2c_probe,
>  	.id_table = adxl372_i2c_id,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ