Skip to content

Commit

Permalink
iio: adc: Add module device table for autoloading
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Aaron Lu authored and Lee Jones committed Nov 18, 2014
1 parent de89bd7 commit 29ec0a2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/iio/adc/axp288_adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>");
Expand Down

0 comments on commit 29ec0a2

Please sign in to comment.