diff options
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spidev.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index 830adbed1d7a..e44abc96cd05 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c | |||
@@ -31,6 +31,8 @@ | |||
31 | #include <linux/mutex.h> | 31 | #include <linux/mutex.h> |
32 | #include <linux/slab.h> | 32 | #include <linux/slab.h> |
33 | #include <linux/compat.h> | 33 | #include <linux/compat.h> |
34 | #include <linux/of.h> | ||
35 | #include <linux/of_device.h> | ||
34 | 36 | ||
35 | #include <linux/spi/spi.h> | 37 | #include <linux/spi/spi.h> |
36 | #include <linux/spi/spidev.h> | 38 | #include <linux/spi/spidev.h> |
@@ -642,10 +644,18 @@ static int __devexit spidev_remove(struct spi_device *spi) | |||
642 | return 0; | 644 | return 0; |
643 | } | 645 | } |
644 | 646 | ||
647 | static const struct of_device_id spidev_dt_ids[] = { | ||
648 | { .compatible = "rohm,dh2228fv" }, | ||
649 | {}, | ||
650 | }; | ||
651 | |||
652 | MODULE_DEVICE_TABLE(of, spidev_dt_ids); | ||
653 | |||
645 | static struct spi_driver spidev_spi_driver = { | 654 | static struct spi_driver spidev_spi_driver = { |
646 | .driver = { | 655 | .driver = { |
647 | .name = "spidev", | 656 | .name = "spidev", |
648 | .owner = THIS_MODULE, | 657 | .owner = THIS_MODULE, |
658 | .of_match_table = of_match_ptr(spidev_dt_ids), | ||
649 | }, | 659 | }, |
650 | .probe = spidev_probe, | 660 | .probe = spidev_probe, |
651 | .remove = __devexit_p(spidev_remove), | 661 | .remove = __devexit_p(spidev_remove), |