[PATCH 08/22] spi: Use of_device_match()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




From: Thierry Reding <treding@xxxxxxxxxx>

Use the common implementation rather than the SPI-private variant.

Signed-off-by: Thierry Reding <treding@xxxxxxxxxx>
---
 drivers/spi/spi.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 77e6e45951f4..df0d800b19f0 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -3019,16 +3019,11 @@ EXPORT_SYMBOL_GPL(spi_write_then_read);
 /*-------------------------------------------------------------------------*/
 
 #if IS_ENABLED(CONFIG_OF_DYNAMIC)
-static int __spi_of_device_match(struct device *dev, void *data)
-{
-	return dev->of_node == data;
-}
-
 /* must call put_device() when done with returned spi_device device */
 static struct spi_device *of_find_spi_device_by_node(struct device_node *node)
 {
 	struct device *dev = bus_find_device(&spi_bus_type, NULL, node,
-						__spi_of_device_match);
+					     of_device_match);
 	return dev ? to_spi_device(dev) : NULL;
 }
 
-- 
2.8.3

--
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



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux