From 5e81efd33a55dc03fe9fb78782adfd7ba553ddb2 Mon Sep 17 00:00:00 2001 From: Jon Medhurst Date: Tue, 13 Jan 2015 16:50:24 +0000 Subject: 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 --- drivers/gpu/drm/arm/hdlcd_drv.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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"); -- cgit v1.2.3