spi: rzv2m-csi: Make use of device_set_node

Use device_set_node instead of assigning controller->dev.of_node
directly because it also sets the firmware node.

Signed-off-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20230718192453.543549-5-fabrizio.castro.jz@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Fabrizio Castro 2023-07-18 20:24:53 +01:00 committed by Mark Brown
parent 7b63568fce
commit c5a7b66811
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -12,6 +12,7 @@
#include <linux/iopoll.h> #include <linux/iopoll.h>
#include <linux/log2.h> #include <linux/log2.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/reset.h> #include <linux/reset.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/units.h> #include <linux/units.h>
@ -589,12 +590,13 @@ static int rzv2m_csi_probe(struct platform_device *pdev)
init_waitqueue_head(&csi->wait); init_waitqueue_head(&csi->wait);
controller->mode_bits = SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST; controller->mode_bits = SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST;
controller->dev.of_node = pdev->dev.of_node;
controller->bits_per_word_mask = SPI_BPW_MASK(16) | SPI_BPW_MASK(8); controller->bits_per_word_mask = SPI_BPW_MASK(16) | SPI_BPW_MASK(8);
controller->setup = rzv2m_csi_setup; controller->setup = rzv2m_csi_setup;
controller->transfer_one = rzv2m_csi_transfer_one; controller->transfer_one = rzv2m_csi_transfer_one;
controller->use_gpio_descriptors = true; controller->use_gpio_descriptors = true;
device_set_node(&controller->dev, dev_fwnode(dev));
ret = devm_request_irq(dev, irq, rzv2m_csi_irq_handler, 0, ret = devm_request_irq(dev, irq, rzv2m_csi_irq_handler, 0,
dev_name(dev), csi); dev_name(dev), csi);
if (ret) if (ret)