net: rfkill-gpio: fix initial state as blocked 14/25914/2
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 15 May 2014 03:30:43 +0000 (12:30 +0900)
committerChanho Park <cometzero@review.tizen.org>
Wed, 13 Aug 2014 02:02:47 +0000 (19:02 -0700)
WORKAROUND: Temporary worgaround for bluetooth enable.
Initial state is not set as blocked, so it is always unblocked
after booting. This patch fixes initual state of rfkill-gpio as
blocked.

Change-Id: Ide67763d10e2ef3ea75fe58d917cd725b26e2cab
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
net/rfkill/rfkill-gpio.c

index ad5c956..212a77f 100644 (file)
@@ -164,12 +164,16 @@ static int rfkill_gpio_probe(struct platform_device *pdev)
        if (!rfkill->rfkill_dev)
                return -ENOMEM;
 
+       rfkill_init_sw_state(rfkill->rfkill_dev, false);
+
        ret = rfkill_register(rfkill->rfkill_dev);
        if (ret < 0)
                return ret;
 
        platform_set_drvdata(pdev, rfkill);
 
+       rfkill_set_sw_state(rfkill->rfkill_dev, true);
+
        dev_info(&pdev->dev, "%s device registered.\n", rfkill->name);
 
        return 0;