aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/linux/linux-openmoko-2.6.32/0001-glamo-core-initialize-engine-states-as-disabled.patch
blob: 1ba29f4092cc1614b03207fa236d9adadf5f106a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From 41d32b16473f81ec94cd51ed51fdc6f54e1f76d6 Mon Sep 17 00:00:00 2001
From: Thibaut Girka <thib@sitedethib.com>
Date: Fri, 25 Jun 2010 20:17:18 +0200
Subject: [PATCH] glamo-core: initialize engine states as disabled

This should fix random init failures such as white screen on boot.
---
 drivers/mfd/glamo/glamo-core.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/mfd/glamo/glamo-core.c b/drivers/mfd/glamo/glamo-core.c
index 33a7a59..f6674f4 100644
--- a/drivers/mfd/glamo/glamo-core.c
+++ b/drivers/mfd/glamo/glamo-core.c
@@ -916,7 +916,7 @@ static int __devinit glamo_supported(struct glamo_core *glamo)
 
 static int __devinit glamo_probe(struct platform_device *pdev)
 {
-	int ret = 0, irq, irq_base;
+	int ret = 0, n, irq, irq_base;
 	struct glamo_core *glamo;
 	struct resource *mem;
 
@@ -924,6 +924,9 @@ static int __devinit glamo_probe(struct platform_device *pdev)
 	if (!glamo)
 		return -ENOMEM;
 
+	for (n = 0; n < __NUM_GLAMO_ENGINES; n++)
+		glamo->engine_state[n] = GLAMO_ENGINE_DISABLED;
+
 	spin_lock_init(&glamo->lock);
 
 	glamo->pdev = pdev;
-- 
1.7.1