summaryrefslogtreecommitdiff
path: root/recipes/linux/linux-openmoko-2.6.34/wm8753-fix-build-with-gcc-4.4.2-which-works-ok-with-.patch
blob: 52fe6262cc074ab8c731548528ae8af1e1d3fa75 (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
From 16722526979959805c493deabaac8cf9ba2f8ef6 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Sat, 7 Nov 2009 20:33:06 +0100
Subject: [PATCH 01/14] wm8753: fix build with gcc-4.4.2, which works ok with 4.1.2

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 sound/soc/codecs/wm8753.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index 5ad677c..e148406 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -710,7 +710,9 @@ static void pll_factors(struct _pll_div *pll_div, unsigned int target,
 	Nmod = target % source;
 	Kpart = FIXED_PLL_SIZE * (long long)Nmod;
 
-	do_div(Kpart, source);
+	// with this, gcc-4.4.2 emits the reference to uldivmod, but then optimizes it out
+	//do_div(Kpart, source);
+	__do_div_asm(Kpart, source);
 
 	K = Kpart & 0xFFFFFFFF;
 
-- 
1.7.1