From 40bba7b6aeda085bebfc7e798de0ae4377de3ff8 Mon Sep 17 00:00:00 2001 From: gwl Date: Tue, 22 Apr 2014 16:03:13 +0800 Subject: [PATCH] BT: fix a bug of rfkill-bt.c, bt_irq_wl used uninited. --- net/rfkill/rfkill-bt.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/net/rfkill/rfkill-bt.c b/net/rfkill/rfkill-bt.c index 3728bec39443..7f2c98888d2f 100755 --- a/net/rfkill/rfkill-bt.c +++ b/net/rfkill/rfkill-bt.c @@ -466,7 +466,7 @@ static int bluetooth_platdata_parse_dt(struct device *dev, if (of_find_property(node, "wifi-bt-power-toggle", NULL)) { data->power_toggle = true; - LOG("%s: get property wifi-bt-power-toggle.\n"); + LOG("%s: get property wifi-bt-power-toggle.\n", __func__); } else { data->power_toggle = false; } @@ -609,10 +609,12 @@ static int rfkill_rk_probe(struct platform_device *pdev) ret = rfkill_rk_setup_gpio(pdev, &pdata->wake_gpio, pdata->name, "wake"); if (ret) goto fail_gpio; - ret = rfkill_rk_setup_wake_irq(rfkill); + ret = rfkill_rk_setup_gpio(pdev, &pdata->rts_gpio, rfkill->pdata->name, "rts"); if (ret) goto fail_gpio; - ret = rfkill_rk_setup_gpio(pdev, &pdata->rts_gpio, rfkill->pdata->name, "rts"); + wake_lock_init(&(rfkill->bt_irq_wl), WAKE_LOCK_SUSPEND, "rfkill_rk_irq_wl"); + + ret = rfkill_rk_setup_wake_irq(rfkill); if (ret) goto fail_gpio; DBG("setup rfkill\n"); @@ -626,7 +628,6 @@ static int rfkill_rk_probe(struct platform_device *pdev) if (ret < 0) goto fail_rfkill; - wake_lock_init(&(rfkill->bt_irq_wl), WAKE_LOCK_SUSPEND, "rfkill_rk_irq_wl"); INIT_DELAYED_WORK(&rfkill->bt_sleep_delay_work, rfkill_rk_delay_sleep_bt); //rfkill_rk_set_power(rfkill, BT_BLOCKED); -- 2.34.1