From: Maxime Ripard Date: Wed, 31 Oct 2012 10:30:08 +0000 (+0100) Subject: spi: spidev: Add device tree bindings X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=880cfd43ea50b3c2d880d94935f07c77bf7c7116;p=linux-beck.git spi: spidev: Add device tree bindings This will allow to probe spidev from device tree by adding the compatible string of each device to this array. Signed-off-by: Maxime Ripard Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index 830adbed1d7a..9fc5788f2095 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c @@ -31,6 +31,8 @@ #include #include #include +#include +#include #include #include @@ -642,10 +644,17 @@ static int __devexit spidev_remove(struct spi_device *spi) return 0; } +static const struct of_device_id spidev_dt_ids[] = { + {}, +}; + +MODULE_DEVICE_TABLE(of, spidev_dt_ids); + static struct spi_driver spidev_spi_driver = { .driver = { .name = "spidev", .owner = THIS_MODULE, + .of_match_table = of_match_ptr(spidev_dt_ids), }, .probe = spidev_probe, .remove = __devexit_p(spidev_remove),