diff mbox

staging: drm/omap: move where DMM driver is registered

Message ID 1333640096-24142-1-git-send-email-rob.clark@linaro.org
State Accepted
Commit be0775ac140dd80a1d60fb7e71ec60e649c14ff8
Headers show

Commit Message

Rob Clark April 5, 2012, 3:34 p.m. UTC
From: Rob Clark <rob@ti.com>

Not sure what triggered the change in behavior, but seems to
result in recursively acquiring a mutex and hanging on boot.  But
omap_drm_init() seems a much more sane place to register the
driver for the DMM sub-device.
---
 drivers/staging/omapdrm/omap_drv.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

Comments

Greg KH April 5, 2012, 4:41 p.m. UTC | #1
On Thu, Apr 05, 2012 at 10:34:56AM -0500, Rob Clark wrote:
> From: Rob Clark <rob@ti.com>
> 
> Not sure what triggered the change in behavior, but seems to
> result in recursively acquiring a mutex and hanging on boot.  But
> omap_drm_init() seems a much more sane place to register the
> driver for the DMM sub-device.
> ---
>  drivers/staging/omapdrm/omap_drv.c |    7 ++++---
>  1 files changed, 4 insertions(+), 3 deletions(-)

Is this needed for 3.4-final?  Any older kernels like 3.3 as well?

thanks,

greg k-h
diff mbox

Patch

diff --git a/drivers/staging/omapdrm/omap_drv.c b/drivers/staging/omapdrm/omap_drv.c
index 3df5b4c..620b8d5 100644
--- a/drivers/staging/omapdrm/omap_drv.c
+++ b/drivers/staging/omapdrm/omap_drv.c
@@ -803,9 +803,6 @@  static void pdev_shutdown(struct platform_device *device)
 static int pdev_probe(struct platform_device *device)
 {
 	DBG("%s", device->name);
-	if (platform_driver_register(&omap_dmm_driver))
-		dev_err(&device->dev, "DMM registration failed\n");
-
 	return drm_platform_init(&omap_drm_driver, device);
 }
 
@@ -833,6 +830,10 @@  struct platform_driver pdev = {
 static int __init omap_drm_init(void)
 {
 	DBG("init");
+	if (platform_driver_register(&omap_dmm_driver)) {
+		/* we can continue on without DMM.. so not fatal */
+		dev_err(NULL, "DMM registration failed\n");
+	}
 	return platform_driver_register(&pdev);
 }