iio: adc: Add missing MODULE_DEVICE_TABLE
authorChunyan Zhang <chunyan.zhang@unisoc.com>
Wed, 12 May 2021 09:38:44 +0000 (17:38 +0800)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 17 May 2021 12:54:24 +0000 (13:54 +0100)
MODULE_DEVICE_TABLE is used to extract the device information out of the
driver and builds a table when being compiled. If using this macro,
kernel can find the driver if available when the device is plugged in,
and then loads that driver and initializes the device.

Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/sc27xx_adc.c

index 301cf66de69502d95e9193eee226a31077647125..00098caf6d9eeb352e74ac2476c986c33b2c367d 100644 (file)
@@ -549,6 +549,7 @@ static const struct of_device_id sc27xx_adc_of_match[] = {
        { .compatible = "sprd,sc2731-adc", },
        { }
 };
+MODULE_DEVICE_TABLE(of, sc27xx_adc_of_match);
 
 static struct platform_driver sc27xx_adc_driver = {
        .probe = sc27xx_adc_probe,