iio: adc: sun4i-gpadc-iio: Fix module autoload when OF devices are registered
authorEduardo Molinas <edu.molinas@gmail.com>
Mon, 1 May 2017 22:45:59 +0000 (18:45 -0400)
committerJonathan Cameron <jic23@kernel.org>
Sun, 7 May 2017 13:45:41 +0000 (14:45 +0100)
commitf35327f16b0cbe51d47a366aaf5dd9a3d4fac01b
treefece0bdefefee7fdca7defc0d0d1507ac61d0ed3
parentf83e36e0a372c012a31d57e9d3e69d29a158264e
iio: adc: sun4i-gpadc-iio: Fix module autoload when OF devices are registered

If the driver is built as a module, it won't be autloaded if the devices
are registered via OF code because the OF device table
entries are not exported as aliases

Before 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

After the patch:
$ modinfo drivers/iio/adc/sun4i-gpadc-iio.ko | grep alias
alias:          of:N*T*Callwinner,sun8i-a33-thsC*
alias:          of:N*T*Callwinner,sun8i-a33-ths
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>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/sun4i-gpadc-iio.c