diff options
author | Aaron Lu <aaron.lu@intel.com> | 2014-11-11 20:30:08 +0100 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2014-11-18 16:33:52 +0100 |
commit | 29ec0a25c8d732d4f51689060ddabb0de3356cc8 (patch) | |
tree | ac778c54a66aac42b5055d3627eaa0ba3936ae3b /drivers/iio | |
parent | iio: adc: Add support for axp288 adc (diff) | |
download | linux-29ec0a25c8d732d4f51689060ddabb0de3356cc8.tar.xz linux-29ec0a25c8d732d4f51689060ddabb0de3356cc8.zip |
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: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/adc/axp288_adc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/iio/adc/axp288_adc.c b/drivers/iio/adc/axp288_adc.c index 480028618a84..4a6cf43df46a 100644 --- a/drivers/iio/adc/axp288_adc.c +++ b/drivers/iio/adc/axp288_adc.c @@ -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>"); |