diff mbox

[PATCHv2] spi: dw: Initialize of_node to discover DT node children

Message ID 1412794294-31248-1-git-send-email-tthayer@opensource.altera.com (mailing list archive)
State Accepted
Commit 9c6de47d53a3ce8df1642ae67823688eb98a190a
Headers show

Commit Message

tthayer@opensource.altera.com Oct. 8, 2014, 6:51 p.m. UTC
From: Thor Thayer <tthayer@opensource.altera.com>

The of_node element must be initialized to enable discovery of node
children which takes place in the of_register_spi_devices() function.

Signed-off-by: Thor Thayer <tthayer@opensource.altera.com>
---
v2:  Remove #ifdef (CONFIG_OF). Remove other files.
---
 drivers/spi/spi-dw.c |    1 +
 1 file changed, 1 insertion(+)

Comments

Mark Brown Oct. 8, 2014, 8:12 p.m. UTC | #1
On Wed, Oct 08, 2014 at 01:51:34PM -0500, tthayer@opensource.altera.com wrote:
> From: Thor Thayer <tthayer@opensource.altera.com>
> 
> The of_node element must be initialized to enable discovery of node
> children which takes place in the of_register_spi_devices() function.

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c
index 0dd0623..0159a70 100644
--- a/drivers/spi/spi-dw.c
+++ b/drivers/spi/spi-dw.c
@@ -671,6 +671,7 @@  int dw_spi_add_host(struct device *dev, struct dw_spi *dws)
 	master->cleanup = dw_spi_cleanup;
 	master->transfer_one_message = dw_spi_transfer_one_message;
 	master->max_speed_hz = dws->max_freq;
+	master->dev.of_node = dev->of_node;
 
 	/* Basic HW init */
 	spi_hw_init(dws);