diff options
author | Jon Medhurst <tixy@linaro.org> | 2015-01-13 16:50:24 +0000 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2017-04-03 11:59:00 +0100 |
commit | 5e81efd33a55dc03fe9fb78782adfd7ba553ddb2 (patch) | |
tree | 153933c301b0bc286b97f0d35ac910e351dcfa23 | |
parent | ffe909ab50baaddb627a3355accba053d0261331 (diff) |
drm: hdlcd: Initialise driver with late_initcall instead of module_init
This is a workaround to ensure the i2c driver is loaded first and should
let us now have the driver built-in rather than as a loadable module.
Signed-off-by: Jon Medhurst <tixy@linaro.org>
-rw-r--r-- | drivers/gpu/drm/arm/hdlcd_drv.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c index 4ce4f970920b..d1d5858611fe 100644 --- a/drivers/gpu/drm/arm/hdlcd_drv.c +++ b/drivers/gpu/drm/arm/hdlcd_drv.c @@ -512,7 +512,19 @@ static struct platform_driver hdlcd_platform_driver = { }, }; -module_platform_driver(hdlcd_platform_driver); +static int __init hdlcd_init(void) +{ + return platform_driver_register(&hdlcd_platform_driver); +} + +static void __exit hdlcd_exit(void) +{ + platform_driver_unregister(&hdlcd_platform_driver); +} + +/* need late_initcall() so we load after i2c driver */ +late_initcall(hdlcd_init); +module_exit(hdlcd_exit); MODULE_AUTHOR("Liviu Dudau"); MODULE_DESCRIPTION("ARM HDLCD DRM driver"); |