Skip to contentSkip to conversation

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

PATCH Superseded Lucas Oshiro 2 participants 2 messages May 18, 2019

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: iio: adis16240: add device to module device table

Add a of_device_id struct and MODULE_DEVICE_TABLE call.

---
 drivers/staging/iio/accel/adis16240.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/staging/iio/accel/adis16240.c +6 -0
index b80e0d248b0f..8c6d23604eca 100644
@@ -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",
Signature · 1 line
2.21.0
#1 lore raw

Hi Lucas,

Quoted 2 lines · Lucas Oshiro

Add a of_device_id struct and MODULE_DEVICE_TABLE call.

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

Thanks