drivers/misc/ti-st: chip_disable on timeout
authorPavan Savoy <pavan_savoy@ti.com>
Fri, 3 Aug 2012 19:49:41 +0000 (14:49 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Aug 2012 17:11:45 +0000 (10:11 -0700)
If the communication with the WiLink breaks down for whatever reasons & the
ti-st driver is unable to un-install the line-discipline during clean-up in
st_kim_stop, the GPIO should be held low (BT_EN=0) & the platform's chip
disable hook shall also be called.

Signed-off-by: Pavan Savoy <pavan_savoy@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/ti-st/st_kim.c

index 847406abd0f824ee9acc80d23ea08dc31bd294c5..54ff644aa56b54f71fc30b94cda7acc84a07bddb 100644 (file)
@@ -524,7 +524,7 @@ long st_kim_stop(void *kim_data)
                        msecs_to_jiffies(LDISC_TIME));
        if (!err) {             /* timeout */
                pr_err(" timed out waiting for ldisc to be un-installed");
-               return -ETIMEDOUT;
+               err = -ETIMEDOUT;
        }
 
        /* platform specific disable */