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:	Wed, 29 Sep 2010 17:14:26 +0900
From:	Grant Likely <grant.likely@...retlab.ca>
To:	Sinan Akman <sinan@...teme.com>
Cc:	linux-kernel@...r.kernel.org, avorontsov@...mvista.com,
	dbrownell@...rs.sourceforge.net
Subject: Re: [PATCH] spi: Add OF-style registration and binding

On Tue, Sep 28, 2010 at 04:47:28PM -0400, Sinan Akman wrote:
> This patch adds the OF hook to the spi core so that devices
> can automatically be registered based on device tree data.
> 
> Signed-off-by: Sinan Akman <sinan@...teme.com>

Applied to -merge, thanks.

g.

> ---
>  drivers/spi/spi.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
> index 0bcf4c1..b5a78a1 100644
> --- a/drivers/spi/spi.c
> +++ b/drivers/spi/spi.c
> @@ -23,6 +23,7 @@
>  #include <linux/init.h>
>  #include <linux/cache.h>
>  #include <linux/mutex.h>
> +#include <linux/of_device.h>
>  #include <linux/slab.h>
>  #include <linux/mod_devicetable.h>
>  #include <linux/spi/spi.h>
> @@ -86,6 +87,10 @@ static int spi_match_device(struct device *dev, struct device_driver *drv)
>  	const struct spi_device	*spi = to_spi_device(dev);
>  	const struct spi_driver	*sdrv = to_spi_driver(drv);
>  
> +	/* Attempt an OF style match */
> +	if (of_driver_match_device(dev, drv))
> +		return 1;
> +
>  	if (sdrv->id_table)
>  		return !!spi_match_id(sdrv->id_table, spi);
>  
> -- 
> 1.6.2.5
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ