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:	Fri, 15 Apr 2016 15:19:35 +0300
From:	Laurentiu Palcu <laurentiu.palcu@...el.com>
To:	Crestez Dan Leonard <leonard.crestez@...el.com>
Cc:	Mark Brown <broonie@...nel.org>, linux-spi@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Octavian Purdila <octavian.purdila@...el.com>,
	Daniel Baluta <daniel.baluta@...el.com>,
	Tiberiu Breana <tiberiu.a.breana@...el.com>
Subject: Re: [PATCH] spi: dln2: Pass of_node to spi master

On Fri, Apr 15, 2016 at 03:10:52PM +0300, Crestez Dan Leonard wrote:
> This allows defining SPI devices connected to a DLN2 using devicetree.
> 
> This already works for i2c because of a similar patch:
> 3b10db23: i2c: dln2: set the device tree node of the adapter
> 
> Signed-off-by: Crestez Dan Leonard <leonard.crestez@...el.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@...el.com>

> ---
>  drivers/spi/spi-dln2.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/spi/spi-dln2.c b/drivers/spi/spi-dln2.c
> index 3b7d91d..4e8a862 100644
> --- a/drivers/spi/spi-dln2.c
> +++ b/drivers/spi/spi-dln2.c
> @@ -683,6 +683,7 @@ static int dln2_spi_probe(struct platform_device *pdev)
>  	struct spi_master *master;
>  	struct dln2_spi *dln2;
>  	struct dln2_platform_data *pdata = dev_get_platdata(&pdev->dev);
> +	struct device *dev = &pdev->dev;
>  	int ret;
>  
>  	master = spi_alloc_master(&pdev->dev, sizeof(*dln2));
> @@ -700,6 +701,8 @@ static int dln2_spi_probe(struct platform_device *pdev)
>  	}
>  
>  	dln2->master = master;
> +	dln2->master->dev.parent = dev;
> +	dln2->master->dev.of_node = dev->of_node;
>  	dln2->pdev = pdev;
>  	dln2->port = pdata->port;
>  	/* cs/mode can never be 0xff, so the first transfer will set them */
> -- 
> 2.5.5
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ