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]
Date:   Thu, 7 May 2020 15:33:46 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Bryan O'Donoghue <bryan.odonoghue@...aro.org>
Cc:     heikki.krogerus@...ux.intel.com, robh+dt@...nel.org,
        linux-usb@...r.kernel.org, devicetree@...r.kernel.org,
        gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
        nikolaus.voss@...wensteinmedical.de, garsilva@...eddedor.com,
        keescook@...omium.org
Subject: Re: [PATCH 2/2] usb: typec: tps6598x: Add OF probe binding

On Thu, May 07, 2020 at 01:23:52PM +0100, Bryan O'Donoghue wrote:
> Adds a MODULE_DEVICE_TABLE() to allow probing of this driver from a DTS
> setting.
> 
> Cc: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: Nikolaus Voss <nikolaus.voss@...wensteinmedical.de>
> Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> Cc: Gustavo A. R. Silva <garsilva@...eddedor.com>
> Cc: Kees Cook <keescook@...omium.org>
> Cc: linux-usb@...r.kernel.org
> Cc: linux-kernel@...r.kernel.org
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@...aro.org>
> ---
>  drivers/usb/typec/tps6598x.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/usb/typec/tps6598x.c b/drivers/usb/typec/tps6598x.c
> index 0698addd1185..61c6761072c9 100644
> --- a/drivers/usb/typec/tps6598x.c
> +++ b/drivers/usb/typec/tps6598x.c
> @@ -563,6 +563,14 @@ static int tps6598x_remove(struct i2c_client *client)
>  	return 0;
>  }
>  
> +#ifdef CONFIG_OF

No need for this (and thus for of_match_ptr() macro below). Saving few dozens of bytes?

> +static const struct of_device_id tps6598x_of_match[] = {
> +	{ .compatible = "ti,tps6598x", },

> +	{},

No comma for terminator line.

> +};
> +MODULE_DEVICE_TABLE(of, tps6598x_of_match);
> +#endif
> +
>  static const struct i2c_device_id tps6598x_id[] = {
>  	{ "tps6598x" },
>  	{ }
> @@ -572,6 +580,7 @@ MODULE_DEVICE_TABLE(i2c, tps6598x_id);
>  static struct i2c_driver tps6598x_i2c_driver = {
>  	.driver = {
>  		.name = "tps6598x",
> +		.of_match_table = of_match_ptr(tps6598x_of_match),

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ