Skip to content

Commit

Permalink
PM / devfreq: rk3399_dmc: Fix module autoload
Browse files Browse the repository at this point in the history
If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.

Export the module alias information using the MODULE_DEVICE_TABLE() macro.

Before this patch:

$ modinfo drivers/devfreq/rk3399_dmc.ko | grep alias
$

After this patch:

$ modinfo drivers/devfreq/rk3399_dmc.ko | grep alias
alias:          of:N*T*Crockchip,rk3399-dmcC*
alias:          of:N*T*Crockchip,rk3399-dmc

Signed-off-by: Javier Martinez Canillas <[email protected]>
Signed-off-by: MyungJoo Ham <[email protected]>
  • Loading branch information
Javier Martinez Canillas authored and myungjoo committed Nov 17, 2016
1 parent a25f094 commit 2f3f1a2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/devfreq/rk3399_dmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ static const struct of_device_id rk3399dmc_devfreq_of_match[] = {
{ .compatible = "rockchip,rk3399-dmc" },
{ },
};
MODULE_DEVICE_TABLE(of, rk3399dmc_devfreq_of_match);

static struct platform_driver rk3399_dmcfreq_driver = {
.probe = rk3399_dmcfreq_probe,
Expand Down

0 comments on commit 2f3f1a2

Please sign in to comment.