summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-10-12 21:38:02 -0600
committerGrant Likely <grant.likely@secretlab.ca>2010-10-12 21:38:02 -0600
commit492c032beccd53f807811b6c14909630d409dd8c (patch)
tree208550c6ccecb8f1b4f85edb91702ca2bdef855e /drivers/spi/spi.c
parentf9d629c737cb6687216a0c540b5466a4bd8b070a (diff)
parentcb655d0f3d57c23db51b981648e452988c0223f9 (diff)
downloadop-kernel-dev-492c032beccd53f807811b6c14909630d409dd8c.zip
op-kernel-dev-492c032beccd53f807811b6c14909630d409dd8c.tar.gz
Merge commit 'v2.6.36-rc7' into spi/next
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r--drivers/spi/spi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 0bcf4c1..b5a78a1 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -23,6 +23,7 @@
#include <linux/init.h>
#include <linux/cache.h>
#include <linux/mutex.h>
+#include <linux/of_device.h>
#include <linux/slab.h>
#include <linux/mod_devicetable.h>
#include <linux/spi/spi.h>
@@ -86,6 +87,10 @@ static int spi_match_device(struct device *dev, struct device_driver *drv)
const struct spi_device *spi = to_spi_device(dev);
const struct spi_driver *sdrv = to_spi_driver(drv);
+ /* Attempt an OF style match */
+ if (of_driver_match_device(dev, drv))
+ return 1;
+
if (sdrv->id_table)
return !!spi_match_id(sdrv->id_table, spi);
OpenPOWER on IntegriCloud