diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-10-08 09:58:55 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-10-08 09:58:55 +0100 |
commit | 552dc340bce3b28f4af33c9134adafa5efacf1c9 (patch) | |
tree | 8ec5d6d4f7462e92baa0732aa2c47cc33a0b851c /drivers/spi/spi.c | |
parent | a9fda02bfc91a281cd812ae15dabe6bfb9574f90 (diff) | |
parent | ee621dd619b9a85eced150fc06e352fef54cfda0 (diff) |
Merge branch 'for_rmk' of git://github.com/at91linux/linux-2.6-at91 into devel-stable
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r-- | drivers/spi/spi.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 0bcf4c1601a..b5a78a1f442 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); |