diff mbox series

iio: adc: qcom-spmi-adc5: Fix of-based module autoloading

Message ID 20190416234927.8888-1-bjorn.andersson@linaro.org
State Accepted
Commit 447ccb4e0834a9f9f0dd5643e421c7f1a1649e6a
Headers show
Series iio: adc: qcom-spmi-adc5: Fix of-based module autoloading | expand

Commit Message

Bjorn Andersson April 16, 2019, 11:49 p.m. UTC
The of_device_id table needs to be registered as module alias in order
for automatic module loading to pick the kernel module based on the
DeviceTree compatible. So add MODULE_DEVICE_TABLE() to make this happen.

Fixes: e13d757279bb ("iio: adc: Add QCOM SPMI PMIC5 ADC driver")
Cc: stable@vger.kernel.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>

---
 drivers/iio/adc/qcom-spmi-adc5.c | 1 +
 1 file changed, 1 insertion(+)

-- 
2.18.0
diff mbox series

Patch

diff --git a/drivers/iio/adc/qcom-spmi-adc5.c b/drivers/iio/adc/qcom-spmi-adc5.c
index 6a866cc187f7..21fdcde77883 100644
--- a/drivers/iio/adc/qcom-spmi-adc5.c
+++ b/drivers/iio/adc/qcom-spmi-adc5.c
@@ -664,6 +664,7 @@  static const struct of_device_id adc5_match_table[] = {
 	},
 	{ }
 };
+MODULE_DEVICE_TABLE(of, adc5_match_table);
 
 static int adc5_get_dt_data(struct adc5_chip *adc, struct device_node *node)
 {