Commit 29ec0a25 authored by Aaron Lu's avatar Aaron Lu Committed by Lee Jones

iio: adc: Add module device table for autoloading

Add the module device id table so that the driver can be automatically
loaded once the platform device is created.
Signed-off-by: default avatarAaron Lu <aaron.lu@intel.com>
Signed-off-by: default avatarJacob Pan <jacob.jun.pan@linux.intel.com>
Acked-by: default avatarJonathan Cameron <jic23@kernel.org>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent de89bd7f
......@@ -238,15 +238,23 @@ static int axp288_adc_remove(struct platform_device *pdev)
return 0;
}
static struct platform_device_id axp288_adc_id_table[] = {
{ .name = "axp288_adc" },
{},
};
static struct platform_driver axp288_adc_driver = {
.probe = axp288_adc_probe,
.remove = axp288_adc_remove,
.id_table = axp288_adc_id_table,
.driver = {
.name = "axp288_adc",
.owner = THIS_MODULE,
},
};
MODULE_DEVICE_TABLE(platform, axp288_adc_id_table);
module_platform_driver(axp288_adc_driver);
MODULE_AUTHOR("Jacob Pan <jacob.jun.pan@linux.intel.com>");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment