diff options
| author | Javier Martinez Canillas <javier@osg.samsung.com> | 2017-01-02 11:03:27 -0500 |
|---|---|---|
| committer | Lee Jones <lee.jones@linaro.org> | 2017-01-04 06:37:58 -0500 |
| commit | bb82250fc45631bcac52af22328cb7c4dda3b763 (patch) | |
| tree | 5edf502b8f83fef28cdff048be3007fcd05d47de | |
| parent | d1b81294575098d989be1f2f6bb628091ceaa87b (diff) | |
backlight: da9052: Fix module autoload
The driver has a platform device ID table with multiple device entries,
each setting a different register address in its driver_data to control
the WLED brightness.
But the driver doesn't export these as aliases with MODULE_DEVICE_TABLE()
when the driver is built as a module, instead it just has a single alias
using MODULE_ALIAS("platform:da9052-backlight"). That is clearly wrong
since there isn't a "da9052-backlight" in the platform device ID table,
so if that device name is used, the device won't even match the driver.
So instead of having a wrong alias, export the ones in the dev ID table.
Before this patch:
$ modinfo drivers/video/backlight/da9052_bl.ko | grep alias
alias: platform:da9052-backlight
After this patch:
$ modinfo drivers/video/backlight/da9052_bl.ko | grep alias
alias: platform:da9052-wled3
alias: platform:da9052-wled2
alias: platform:da9052-wled1
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Acked-by: Jingoo Han <jingoohan1@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
| -rw-r--r-- | drivers/video/backlight/da9052_bl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/backlight/da9052_bl.c b/drivers/video/backlight/da9052_bl.c index fd2be417aa64..49035c12739a 100644 --- a/drivers/video/backlight/da9052_bl.c +++ b/drivers/video/backlight/da9052_bl.c | |||
| @@ -167,6 +167,7 @@ static const struct platform_device_id da9052_wled_ids[] = { | |||
| 167 | }, | 167 | }, |
| 168 | { }, | 168 | { }, |
| 169 | }; | 169 | }; |
| 170 | MODULE_DEVICE_TABLE(platform, da9052_wled_ids); | ||
| 170 | 171 | ||
| 171 | static struct platform_driver da9052_wled_driver = { | 172 | static struct platform_driver da9052_wled_driver = { |
| 172 | .probe = da9052_backlight_probe, | 173 | .probe = da9052_backlight_probe, |
| @@ -182,4 +183,3 @@ module_platform_driver(da9052_wled_driver); | |||
| 182 | MODULE_AUTHOR("David Dajun Chen <dchen@diasemi.com>"); | 183 | MODULE_AUTHOR("David Dajun Chen <dchen@diasemi.com>"); |
| 183 | MODULE_DESCRIPTION("Backlight driver for DA9052 PMIC"); | 184 | MODULE_DESCRIPTION("Backlight driver for DA9052 PMIC"); |
| 184 | MODULE_LICENSE("GPL"); | 185 | MODULE_LICENSE("GPL"); |
| 185 | MODULE_ALIAS("platform:da9052-backlight"); | ||
