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
6 From: Axel Lin <axel.lin@gmail.com>
8 commit 1a64200ec5e93be03e27c3b2fc332e04ae443eb2 upstream.
10 Fix below build warning and properly set bt_reset pin.
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
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>
23 arch/arm/mach-pxa/cm-x300.c | 8 +++-----
24 1 file changed, 3 insertions(+), 5 deletions(-)
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[]
30 static void __init cm_x300_init_wi2wi(void)
32 - int bt_reset, wlan_en;
35 if (system_rev < 130) {
36 @@ -791,12 +790,11 @@ static void __init cm_x300_init_wi2wi(vo
40 - gpio_set_value(bt_reset, 0);
41 + gpio_set_value(cm_x300_wi2wi_gpios[1].gpio, 0);
43 - gpio_set_value(bt_reset, 1);
44 + gpio_set_value(cm_x300_wi2wi_gpios[1].gpio, 1);
47 - gpio_free(bt_reset);
48 + gpio_free_array(ARRAY_AND_SIZE(cm_x300_wi2wi_gpios));