On 10/08/2014 03:17 AM, Andy Shevchenko wrote:
On Tue, 2014-10-07 at 14:48 -0500, tthayer@xxxxxxxxxxxxxxxxxxxxx wrote:
From: Thor Thayer <tthayer@xxxxxxxxxxxxxxxxxxxxx>
1. The of_node element must be initialized to enable discovery of node
children. The discovery takes place in the of_register_spi_devices() function.
2. Grabbing the bus-num from the device tree.
3. Update the SOCFPGA configuration.
[]
--- a/drivers/spi/spi-dw.c
+++ b/drivers/spi/spi-dw.c
@@ -671,6 +671,9 @@ 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;
+#if defined(CONFIG_OF)
+ master->dev.of_node = dev->of_node;
+#endif
I'm not sure you need this #ifdef surrounded an assignment.
If I'm wrong then you probably have to use if (IS_ENABLED(CONFIG_OF)).
Hi Andy.
Good point. I will remove those.
Thank you for reviewing.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html