Commit e1c49bdc authored by Thierry Reding's avatar Thierry Reding Committed by Tomi Valkeinen
Browse files

drm/omap: Use platform_register/unregister_drivers()

These new helpers simplify implementing multi-driver modules and
properly handle failure to register one driver by unregistering all
previously registered drivers.
Signed-off-by: default avatarThierry Reding <>
Signed-off-by: default avatarTomi Valkeinen <>
parent d4182e35
......@@ -928,35 +928,23 @@ static struct platform_driver pdev = {
.remove = pdev_remove,
static struct platform_driver * const drivers[] = {
static int __init omap_drm_init(void)
int r;
r = platform_driver_register(&omap_dmm_driver);
if (r) {
pr_err("DMM driver registration failed\n");
return r;
r = platform_driver_register(&pdev);
if (r) {
pr_err("omapdrm driver registration failed\n");
return r;
return 0;
return platform_register_drivers(drivers, ARRAY_SIZE(drivers));
static void __exit omap_drm_fini(void)
platform_unregister_drivers(drivers, ARRAY_SIZE(drivers));
/* need late_initcall() so we load after dss_driver's are loaded */
Supports Markdown
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