From: Nishad Kamdar Date: Wed, 31 Oct 2018 16:00:36 +0000 (+0530) Subject: staging: iio: ad2s1210: Add device tree table. X-Git-Tag: v5.4-rc1~1925^2~249^2~45 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=382c7fce7005b55f0583cf5905758d2b8def803a;p=platform%2Fkernel%2Flinux-rpi.git staging: iio: ad2s1210: Add device tree table. Add device tree table for matching vendor ID. Note that as the driver is still heavily in flux and there are some non obvious aspects to a comprehensive binding, that binding will be submitted at a later date (before leaving staging!) Signed-off-by: Nishad Kamdar Signed-off-by: Jonathan Cameron --- diff --git a/drivers/staging/iio/resolver/ad2s1210.c b/drivers/staging/iio/resolver/ad2s1210.c index 2359441..cec9d99 100644 --- a/drivers/staging/iio/resolver/ad2s1210.c +++ b/drivers/staging/iio/resolver/ad2s1210.c @@ -699,6 +699,12 @@ static int ad2s1210_remove(struct spi_device *spi) return 0; } +static const struct of_device_id ad2s1210_of_match[] = { + { .compatible = "adi,ad2s1210", }, + { } +}; +MODULE_DEVICE_TABLE(of, ad2s1210_of_match); + static const struct spi_device_id ad2s1210_id[] = { { "ad2s1210" }, {} @@ -708,6 +714,7 @@ MODULE_DEVICE_TABLE(spi, ad2s1210_id); static struct spi_driver ad2s1210_driver = { .driver = { .name = DRV_NAME, + .of_match_table = of_match_ptr(ad2s1210_of_match), }, .probe = ad2s1210_probe, .remove = ad2s1210_remove,