diff mbox series

staging: iio: adis16240: add device to module device table

Message ID 20190518210008.20147-1-lucasseikioshiro@gmail.com (mailing list archive)
State New, archived
Headers show
Series staging: iio: adis16240: add device to module device table | expand

Commit Message

Lucas Oshiro May 18, 2019, 9 p.m. UTC
Add a of_device_id struct and MODULE_DEVICE_TABLE call.

Signed-off-by: Lucas Oshiro <lucasseikioshiro@gmail.com>
Signed-off-by: Rodrigo Ribeiro <rodrigorsdc@gmail.com>
Co-developed-by: Rodrigo Ribeiro <rodrigorsdc@gmail.com>
---
 drivers/staging/iio/accel/adis16240.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Fabio Estevam May 18, 2019, 9:06 p.m. UTC | #1
Hi Lucas,

On Sat, May 18, 2019 at 6:01 PM Lucas Oshiro <lucasseikioshiro@gmail.com> wrote:
>
> Add a of_device_id struct and MODULE_DEVICE_TABLE call.

Please provide an explanation as to why you are doing this.

Thanks
diff mbox series

Patch

diff --git a/drivers/staging/iio/accel/adis16240.c b/drivers/staging/iio/accel/adis16240.c
index b80e0d248b0f..8c6d23604eca 100644
--- a/drivers/staging/iio/accel/adis16240.c
+++ b/drivers/staging/iio/accel/adis16240.c
@@ -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",