diff options
| author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-10-19 17:06:36 -0400 |
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-10-19 17:06:36 -0400 |
| commit | 809b4e00baf006a990a73329ba381d536c6fa277 (patch) | |
| tree | e949e0efd019d6f932537aba762792b07a84351c /drivers/spi/spi.c | |
| parent | a0a55682b83fd5f012afadcf415b030d7424ae68 (diff) | |
| parent | 79a94c3538bda6869d7bb150b5e02dd3a72314dd (diff) | |
Merge branch 'devel-stable' into devel
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 0bcf4c1601a2..b5a78a1f4421 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
| 24 | #include <linux/cache.h> | 24 | #include <linux/cache.h> |
| 25 | #include <linux/mutex.h> | 25 | #include <linux/mutex.h> |
| 26 | #include <linux/of_device.h> | ||
| 26 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
| 27 | #include <linux/mod_devicetable.h> | 28 | #include <linux/mod_devicetable.h> |
| 28 | #include <linux/spi/spi.h> | 29 | #include <linux/spi/spi.h> |
| @@ -86,6 +87,10 @@ static int spi_match_device(struct device *dev, struct device_driver *drv) | |||
| 86 | const struct spi_device *spi = to_spi_device(dev); | 87 | const struct spi_device *spi = to_spi_device(dev); |
| 87 | const struct spi_driver *sdrv = to_spi_driver(drv); | 88 | const struct spi_driver *sdrv = to_spi_driver(drv); |
| 88 | 89 | ||
| 90 | /* Attempt an OF style match */ | ||
| 91 | if (of_driver_match_device(dev, drv)) | ||
| 92 | return 1; | ||
| 93 | |||
| 89 | if (sdrv->id_table) | 94 | if (sdrv->id_table) |
| 90 | return !!spi_match_id(sdrv->id_table, spi); | 95 | return !!spi_match_id(sdrv->id_table, spi); |
| 91 | 96 | ||
