From linux-omap-owner@vger.kernel.org Sat Sep 12 18:36:17 2009 Received: from localhost ([127.0.0.1] helo=dominion ident=koen) by dominion.dominion.void with esmtp (Exim 4.69) (envelope-from ) id 1MmVaD-0005nl-6f for koen@localhost; Sat, 12 Sep 2009 18:36:17 +0200 Received: from xs.service.utwente.nl [130.89.5.250] by dominion with POP3 (fetchmail-6.3.9-rc2) for (single-drop); Sat, 12 Sep 2009 18:36:17 +0200 (CEST) Received: from mail.service.utwente.nl ([130.89.5.254]) by exchange.service.utwente.nl with Microsoft SMTPSVC(6.0.3790.3959); Sat, 12 Sep 2009 18:34:31 +0200 Received: from mx.utwente.nl ([130.89.2.13]) by mail.service.utwente.nl with Microsoft SMTPSVC(6.0.3790.3959); Sat, 12 Sep 2009 18:34:31 +0200 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by mx.utwente.nl (8.12.10/SuSE Linux 0.7) with ESMTP id n8CGYLR7001279 for ; Sat, 12 Sep 2009 18:34:22 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754253AbZILQeP (ORCPT ); Sat, 12 Sep 2009 12:34:15 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754362AbZILQeP (ORCPT ); Sat, 12 Sep 2009 12:34:15 -0400 Received: from fg-out-1718.google.com ([72.14.220.157]:62107 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754253AbZILQeO (ORCPT ); Sat, 12 Sep 2009 12:34:14 -0400 Received: by fg-out-1718.google.com with SMTP id 22so194962fge.1 for ; Sat, 12 Sep 2009 09:34:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer; bh=AAXJA19IlSONsCjIPh2mme+ulWCBhEJbyCxyyJZk4jY=; b=CENOacQ7/T2g5eQKy8wvo7vClGTIOU0xNgsYWpcBl2GAwrVooMvJRMWImFJYSEaU9r wZTrSIouwCoeC5J2yZII6kezDggm44Nj1eA8S+c9Hj/SSt6oU1Jqc9Ttvn7jS2SxC47i 0QMLWTjaRyCHVy8jfQtObilIeTnBjDMU70FkE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer; b=TVKZoERoRk1PULFXvIXEWvDKkUb/E37Cni4zLjE4PU+5bT/zGL4a+NSkifrRx5w3ku X7DR9Zc5c1NIJ0mhR5kCk6fZ6Yjp1vwo6tmzvZB9Dcy6AxWumrzjBte2EdW1Lw1l1URf /QDALV74V+WT4Etn+yPAlt6Zd7WbgVcqCSEc4= Received: by 10.87.42.14 with SMTP id u14mr3277117fgj.28.1252773257105; Sat, 12 Sep 2009 09:34:17 -0700 (PDT) Received: from localhost ([95.87.222.103]) by mx.google.com with ESMTPS id 4sm1764938fge.4.2009.09.12.09.34.12 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 12 Sep 2009 09:34:13 -0700 (PDT) From: Sergio Aguirre To: Imre Deak Cc: linux-fbdev-devel@lists.sourceforge.net, linux-omap@vger.kernel.org, Sergio Aguirre Subject: [PATCH] omapfb: Reorder Register_framebuffer call Date: Sat, 12 Sep 2009 19:34:09 +0300 Message-Id: <1252773249-24444-1-git-send-email-saaguirre@ti.com> X-Mailer: git-send-email 1.6.4.2 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-UTwente-MailScanner-Information: Scanned by MailScanner. Contact icts.servicedesk@utwente.nl for more information. X-UTwente-MailScanner: Found to be clean X-UTwente-MailScanner-From: linux-omap-owner@vger.kernel.org X-Spam-Status: No X-OriginalArrivalTime: 12 Sep 2009 16:34:31.0630 (UTC) FILETIME=[E7A3E6E0:01CA33C6] This fixes the issue in which mm_lock mutex was attempted to be used without initializing previously. Thanks to the testers! - OMAP3430 SDP (Anand Gadiyar) - OMAP3530 EVM (Vaibhav Hiremath) - LogicPD's OMAP boards (Peter Brada) - Beagleboard Rev. C2 (Eric Witcher) Signed-off-by: Sergio Aguirre Tested-by: Vaibhav Hiremath Tested-by: Anand Gadiyar Tested-by: Peter Barada Tested-by: Eric Witcher --- drivers/video/omap/omapfb_main.c | 20 +++++++++++--------- 1 files changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c index 125e605..60f9482 100644 --- a/drivers/video/omap/omapfb_main.c +++ b/drivers/video/omap/omapfb_main.c @@ -1503,12 +1503,21 @@ static int fbinfo_init(struct omapfb_device *fbdev, struct fb_info *info) var->rotate = def_rotate; var->bits_per_pixel = fbdev->panel->bpp; + r = register_framebuffer(info); + if (r != 0) { + dev_err(fbdev->dev, + "registering framebuffer failed\n"); + return r; + } + set_fb_var(info, var); set_fb_fix(info); r = fb_alloc_cmap(&info->cmap, 16, 0); - if (r != 0) + if (r != 0) { dev_err(fbdev->dev, "unable to allocate color map memory\n"); + unregister_framebuffer(info); + } return r; } @@ -1773,15 +1782,8 @@ static int omapfb_do_probe(struct platform_device *pdev, init_state++; vram = 0; - for (i = 0; i < fbdev->mem_desc.region_cnt; i++) { - r = register_framebuffer(fbdev->fb_info[i]); - if (r != 0) { - dev_err(fbdev->dev, - "registering framebuffer %d failed\n", i); - goto cleanup; - } + for (i = 0; i < fbdev->mem_desc.region_cnt; i++) vram += fbdev->mem_desc.region[i].size; - } fbdev->state = OMAPFB_ACTIVE; -- 1.6.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html