]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: iio: adis16240: add device to module device table
authorLucas Oshiro <lucasseikioshiro@gmail.com>
Sat, 18 May 2019 21:44:34 +0000 (18:44 -0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 26 May 2019 17:48:14 +0000 (18:48 +0100)
Add a of_device_id struct and MODULE_DEVICE_TABLE call, in order to add
device-tree support for this driver.

Signed-off-by: Lucas Oshiro <lucasseikioshiro@gmail.com>
Signed-off-by: Rodrigo Ribeiro <rodrigorsdc@gmail.com>
Co-developed-by: Rodrigo Ribeiro <rodrigorsdc@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/staging/iio/accel/adis16240.c

index b80e0d248b0f1108b57d6e093b2a455c587cbf18..8c6d23604eca29028ec7a5a14760f53c5e2b7624 100644 (file)
@@ -435,6 +435,12 @@ static int adis16240_remove(struct spi_device *spi)
        return 0;
 }
 
+static const struct of_device_id adis16240_of_match[] = {
+       { .compatible = "adi,adis16240" },
+       { },
+};
+MODULE_DEVICE_TABLE(of, adis16240_of_match);
+
 static struct spi_driver adis16240_driver = {
        .driver = {
                .name = "adis16240",