drivers:misc: Setup gamepad_reset gpio only on loki
Ankita Garg [Thu, 22 Jan 2015 21:29:54 +0000 (13:29 -0800)]
Bug 1587415

Change-Id: I304bd5f92918e0dc9c1632f9abed66721c62ff17
Signed-off-by: Ankita Garg <ankitag@nvidia.com>
Reviewed-on: http://git-master/r/745798
(cherry picked from commit 432ac02d26e0515587202dd97d5333215018d8e0)
Reviewed-on: http://git-master/r/779479
Reviewed-by: Raymond Poudrier <rapoudrier@nvidia.com>

drivers/misc/nv_gamepad_reset.c

index 3fdd7ea..48a2111 100644 (file)
@@ -85,11 +85,14 @@ static int gamepad_reset_remove(struct platform_device *pdev)
        return 0;
 }
 
-int gamepad_reset_gpio = -1;
+static int gamepad_reset_gpio = -1;
 void gamepad_reset_war(void)
 {
        int ret;
 
+       if (gamepad_reset_gpio < 0)
+               return;
+
        ret = gpio_request(gamepad_reset_gpio, "GAMEPAD_RST");
        if (ret < 0) {
                pr_err("%s: gpio_request failed %d\n", __func__, ret);