Skip to content
Commit bb82250f authored by Javier Martinez Canillas's avatar Javier Martinez Canillas Committed by Lee Jones
Browse files

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: default avatarJavier Martinez Canillas <javier@osg.samsung.com>
Acked-by: default avatarAdam Thomson <Adam.Thomson.Opensource@diasemi.com>
Acked-by: default avatarJingoo Han <jingoohan1@gmail.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent d1b81294
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment