summaryrefslogtreecommitdiff
path: root/drivers/iio/adc/sun4i-gpadc-iio.c
diff options
context:
space:
mode:
authorEduardo Molinas <edu.molinas@gmail.com>2017-05-01 18:45:58 -0400
committerJonathan Cameron <jic23@kernel.org>2017-05-07 14:44:42 +0100
commitf83e36e0a372c012a31d57e9d3e69d29a158264e (patch)
tree1ac0c617cdd4a36eb72f8a80b93339cc4d5afb51 /drivers/iio/adc/sun4i-gpadc-iio.c
parent9122b54f266ddee09654fe3fbc503c1a60f4a01c (diff)
downloadlwn-f83e36e0a372c012a31d57e9d3e69d29a158264e.tar.gz
lwn-f83e36e0a372c012a31d57e9d3e69d29a158264e.zip
iio: adc: sun4i-gpadc-iio: Fix module autoload when PLATFORM devices are registered
If the driver is built as a module, it won't be autloaded if the devices are registered via PLATFORM code because the PLATFORM device table entries are not exported as aliases Before the patch: $ modinfo drivers/iio/adc/sun4i-gpadc-iio.ko | grep alias $ After the patch: $ modinfo drivers/iio/adc/sun4i-gpadc-iio.ko | grep alias alias: platform:sun6i-a31-gpadc-iio alias: platform:sun5i-a13-gpadc-iio alias: platform:sun4i-a10-gpadc-iio Signed-off-by: Eduardo Molinas <edu.molinas@gmail.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/adc/sun4i-gpadc-iio.c')
-rw-r--r--drivers/iio/adc/sun4i-gpadc-iio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c
index b23527309088..c3d7ba100a48 100644
--- a/drivers/iio/adc/sun4i-gpadc-iio.c
+++ b/drivers/iio/adc/sun4i-gpadc-iio.c
@@ -700,6 +700,7 @@ static const struct platform_device_id sun4i_gpadc_id[] = {
{ "sun6i-a31-gpadc-iio", (kernel_ulong_t)&sun6i_gpadc_data },
{ /* sentinel */ },
};
+MODULE_DEVICE_TABLE(platform, sun4i_gpadc_id);
static struct platform_driver sun4i_gpadc_driver = {
.driver = {