]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.1.1/arm-pxa-cm-x300-properly-set-bt_reset-pin.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.1.1 / arm-pxa-cm-x300-properly-set-bt_reset-pin.patch
1 From 1a64200ec5e93be03e27c3b2fc332e04ae443eb2 Mon Sep 17 00:00:00 2001
2 From: Axel Lin <axel.lin@gmail.com>
3 Date: Sat, 17 Sep 2011 22:15:34 +0800
4 Subject: ARM: pxa/cm-x300: properly set bt_reset pin
5
6 From: Axel Lin <axel.lin@gmail.com>
7
8 commit 1a64200ec5e93be03e27c3b2fc332e04ae443eb2 upstream.
9
10 Fix below build warning and properly set bt_reset pin.
11
12 CC arch/arm/mach-pxa/cm-x300.o
13 arch/arm/mach-pxa/cm-x300.c: In function 'cm_x300_init_wi2wi':
14 arch/arm/mach-pxa/cm-x300.c:779: warning: unused variable 'wlan_en'
15 arch/arm/mach-pxa/cm-x300.c:795: warning: 'bt_reset' may be used uninitialized in this function
16
17 Signed-off-by: Axel Lin <axel.lin@gmail.com>
18 Acked-by: Igor Grinberg <grinberg@compulab.co.il>
19 Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
20 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
21
22 ---
23 arch/arm/mach-pxa/cm-x300.c | 8 +++-----
24 1 file changed, 3 insertions(+), 5 deletions(-)
25
26 --- a/arch/arm/mach-pxa/cm-x300.c
27 +++ b/arch/arm/mach-pxa/cm-x300.c
28 @@ -775,7 +775,6 @@ static struct gpio cm_x300_wi2wi_gpios[]
29
30 static void __init cm_x300_init_wi2wi(void)
31 {
32 - int bt_reset, wlan_en;
33 int err;
34
35 if (system_rev < 130) {
36 @@ -791,12 +790,11 @@ static void __init cm_x300_init_wi2wi(vo
37 }
38
39 udelay(10);
40 - gpio_set_value(bt_reset, 0);
41 + gpio_set_value(cm_x300_wi2wi_gpios[1].gpio, 0);
42 udelay(10);
43 - gpio_set_value(bt_reset, 1);
44 + gpio_set_value(cm_x300_wi2wi_gpios[1].gpio, 1);
45
46 - gpio_free(wlan_en);
47 - gpio_free(bt_reset);
48 + gpio_free_array(ARRAY_AND_SIZE(cm_x300_wi2wi_gpios));
49 }
50
51 /* MFP */